Skip to content

Commit

Permalink
fixup! [1/2] Assert metadata schema location (#6516)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirho-ucsc committed Jan 9, 2025
1 parent c843a4c commit 392a9f5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/hca_metadata_api/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,8 +783,19 @@ def test_valid_schema_domain(self):

def test_invalid_schema_domain(self):
json_body = self.json_body(domain='foo.humancellatlas.org')
with self.assertRaises(RequirementError):
with self.assertRaises(RequirementError) as cm:
Protocol.from_json(json_body)
expected = (
'Unexpected schema domain',
furl('https://foo.humancellatlas.org/type/protocol/7.1.0/protocol'),
[
'schema.humancellatlas.org',
'schema.dev.data.humancellatlas.org',
'schema.staging.data.humancellatlas.org',
'schema.integration.data.humancellatlas.org'
]
)
self.assertEqual(expected, cm.exception.args)


def load_tests(_loader, tests, _ignore):
Expand Down

0 comments on commit 392a9f5

Please sign in to comment.