Skip to content

Commit

Permalink
Add an extra test for .jsonld()
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldogsbody committed Jun 11, 2023
1 parent a833527 commit 356ad44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ def test_context_excluded(self):

self.assertEqual(manifest_json[:49], '{"id": "http://iiif.example.org/prezi/Manifest/0"')

def text_jsonld_context_excluded(self):
"""Test that @context is not excluded from .jsonld() calls, even when requested."""
manifest = Manifest(id='http://iiif.example.org/prezi/Manifest/0', type='Manifest', label={'en': ['default label']})
manifest_json = manifest.jsonld(exclude_context=True)

self.assertEqual(manifest_json[:61], '{"@context": "http://iiif.io/api/presentation/3/context.json"')


if __name__ == '__main__':
unittest.main()

0 comments on commit 356ad44

Please sign in to comment.