Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON schema validation is broken #434

Closed
cthoyt opened this issue Sep 27, 2023 · 1 comment
Closed

JSON schema validation is broken #434

cthoyt opened this issue Sep 27, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@cthoyt
Copy link
Member

cthoyt commented Sep 27, 2023

I found that JSON schema validation does not do what's expected while working on #431. The following code

def test_validate_json_fail(self):
"""
Test if JSONSchemaValidation fail is as expected.
In this particular test case, the 'mapping_justification' slot
does not have EntityReference objects, but strings.
"""
self.assertRaises(ValidationError, validate, self.bad_msdf1, self.validation_types)

Claims to be testing 'mapping_justification' slot does not have EntityReference objects, but strings., but that is not the error that is thrown. There the main issues here are:

  • The test is very very opaque as to what it's testing
  • A validation error is raised, but not the expected one, and this goes undetected
@cthoyt cthoyt added the bug Something isn't working label Sep 27, 2023
@matentzn
Copy link
Collaborator

I did not encounter this anymore after extensive work on validation (after latest refactor). Closing but please reopen if still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants