Skip to content
Snippets Groups Projects
Commit f012122f authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Merge branch 'feature/update-config-schema' into 'develop'

update configuration file key

See merge request goat/gap/larp!4
parents 011a3e1c 4d5df292
No related branches found
No related tags found
1 merge request!4update configuration file key
{ {
"collection-uri": "organisation.collection" "collection-name": "organisation.collection"
} }
...@@ -9,9 +9,9 @@ CONFIG_SCHEMA = { ...@@ -9,9 +9,9 @@ CONFIG_SCHEMA = {
'type': 'object', 'type': 'object',
'properties': { 'properties': {
'collection-uri': {'type': 'string'}, 'collection-name': {'type': 'string'},
}, },
'required': ['collection-uri'], 'required': ['collection-name'],
'additionalProperties': False 'additionalProperties': False
} }
......
...@@ -11,7 +11,7 @@ import larp ...@@ -11,7 +11,7 @@ import larp
@pytest.fixture @pytest.fixture
def good_config_data(): def good_config_data():
return { return {
'collection-uri': 'organisation.collection' 'collection-name': 'organisation.collection'
} }
......
...@@ -22,5 +22,5 @@ def test_config_correct(good_config_data): ...@@ -22,5 +22,5 @@ def test_config_correct(good_config_data):
def test_config_incorrect(bad_config_data): def test_config_incorrect(bad_config_data):
with io.StringIO(json.dumps(bad_config_data)) as f: with io.StringIO(json.dumps(bad_config_data)) as f:
f.seek(0) f.seek(0)
with pytest.raises(Exception, match="'collection-uri' is a required property"): with pytest.raises(Exception, match="'collection-name' is a required property"):
config.load_from_file(f) config.load_from_file(f)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment