Skip to content

Commit

Permalink
Update jsonschema dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-saeon committed May 27, 2019
1 parent 41a6d45 commit 6f7583f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions ckanext/metadata/logic/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ def json_schema_validator(key, data, errors, context):
JSONValidator.check_schema(schema)
except ValueError, e:
_abort(errors, key, _("JSON decode error: %s") % e.message)
except AttributeError, e:
_abort(errors, key, _("Expecting a JSON dictionary"))
except jsonschema.SchemaError, e:
_abort(errors, key, _("Invalid JSON schema: %s") % e.message)

Expand Down
4 changes: 2 additions & 2 deletions ckanext/metadata/tests/test_metadata_schema_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def test_create_invalid_not_json(self):
def test_create_invalid_not_json_dict(self):
result, obj = self.test_action('metadata_schema_create', should_error=True,
schema_json='[1,2,3]')
assert_error(result, 'schema_json', 'Expecting a JSON dictionary')
assert_error(result, 'schema_json', 'Invalid JSON schema')

def test_create_invalid_not_json_schema(self):
result, obj = self.test_action('metadata_schema_create', should_error=True,
Expand Down Expand Up @@ -682,7 +682,7 @@ def test_update_invalid_not_json_dict(self):
result, obj = self.test_action('metadata_schema_update', should_error=True,
id=metadata_schema['id'],
schema_json='[1,2,3]')
assert_error(result, 'schema_json', 'Expecting a JSON dictionary')
assert_error(result, 'schema_json', 'Invalid JSON schema')

def test_update_invalid_not_json_schema(self):
metadata_schema = ckanext_factories.MetadataSchema()
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jsonschema==3.0.0a3
jsonschema==3.0.1
jsonpointer==2.0
rfc3987==1.3.8
celery==4.2.1

0 comments on commit 6f7583f

Please sign in to comment.