Skip to content

Commit

Permalink
add mock config (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmotso authored and leits committed Jun 19, 2018
1 parent 614834c commit a6ca8c4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 44 deletions.
22 changes: 0 additions & 22 deletions openregistry/assets/basic/tests/app_meta.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions openregistry/assets/basic/tests/auth.ini

This file was deleted.

13 changes: 12 additions & 1 deletion openregistry/assets/basic/tests/base.py
Expand Up @@ -4,13 +4,23 @@

from openregistry.assets.core.tests.base import (
BaseAssetWebTest as BaseAWT,
test_asset_basic_data
test_asset_basic_data,
connection_mock_config,
MOCK_CONFIG as BASE_MOCK_CONFIG
)


from openregistry.assets.basic.tests.fixtures import PARTIAL_MOCK_CONFIG
MOCK_CONFIG = connection_mock_config(PARTIAL_MOCK_CONFIG,
base=BASE_MOCK_CONFIG,
connector=('plugins', 'api', 'plugins',
'assets.core', 'plugins'))


class BaseAssetWebTest(BaseAWT):
initial_auth = ('Basic', ('broker', ''))
relative_to = os.path.dirname(__file__)
mock_config = MOCK_CONFIG

def setUp(self):
self.initial_data = deepcopy(test_asset_basic_data)
Expand All @@ -20,4 +30,5 @@ def setUp(self):
class AssetContentWebTest(BaseAssetWebTest):
init = True
initial_status = 'pending'
mock_config = MOCK_CONFIG

6 changes: 6 additions & 0 deletions openregistry/assets/basic/tests/fixtures.py
@@ -0,0 +1,6 @@
PARTIAL_MOCK_CONFIG = {
"assets.basic":{
"use_default":True,
"aliases":["basic1"]
}
}

0 comments on commit a6ca8c4

Please sign in to comment.