Skip to content

Commit

Permalink
Add some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hadro committed Jul 24, 2023
1 parent 09782ef commit 2122e04
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/test_manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,29 @@ def test_v3_vermont_Life_Magazine(self):

self.assertEqual(len(manifest['items']),116,f"Expected 116 canvas but got: {len(manifest['items'])}")

def test_v3_single_video_manifest(self):
resp = self.test_app.get("/iiif/3/youtube-7w8F2Xi3vFw/manifest.json")
self.assertEqual(resp.status_code, 200)
manifest = resp.json

self.assertEqual(len(manifest['items']),1,f"Expected 1 canvas but got: {len(manifest['items'])}")

#logic to cover etree mediatype github issue #123
def test_v3_etree_mediatype(self):
resp = self.test_app.get("/iiif/3/gd72-04-14.aud.vernon.23662.sbeok.shnf/manifest.json")
self.assertEqual(resp.status_code, 200)
manifest = resp.json

self.assertEqual(len(manifest['items']),36,f"Expected 1 canvas but got: {len(manifest['items'])}")

''' to test:
TvQuran.com__Alafasi (64Kbps MP3)
alice_in_wonderland_librivox (128kbps mp3)
kaled_jalil (no derivatives)
taboca_201002_03 (h.264 MPEG4, OGG Theora)
Dokku_obrash (geo-restricted?)
'''

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

0 comments on commit 2122e04

Please sign in to comment.