Skip to content

Commit

Permalink
Proxying vtt files
Browse files Browse the repository at this point in the history
  • Loading branch information
glenrobson committed May 17, 2024
1 parent 12ace1b commit 65c97f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_vtt_autogenerated(self):
self.assertEqual(body['format'],'text/vtt', "Expected body to have a type text")
self.assertEqual(body['label']['en'][0], "autogenerated", "Expected VTT file to have the label autogenerated")
self.assertFalse("language" in body, "We don't know the language for this item so there shouldn't be a language specified")
self.assertEqual(body['id'], "https://archive.org/download/youtube-SvH4fbjOT0A/34C3_-_International_Image_Interoperability_Framework_IIIF_Kulturinstitutionen_schaffen_interop-SvH4fbjOT0A.autogenerated.vtt","Unexpected URL for the VTT file")
self.assertEqual(body['id'], "https://localhost/iiif/resource/youtube-SvH4fbjOT0A/34C3_-_International_Image_Interoperability_Framework_IIIF_Kulturinstitutionen_schaffen_interop-SvH4fbjOT0A.autogenerated.vtt","Unexpected URL for the VTT file")

def test_vtt_multilingual(self):
resp = self.test_app.get("/iiif/3/cruz-test/manifest.json?recache=true")
Expand All @@ -61,7 +61,7 @@ def test_vtt_multilingual(self):
for item in annotations:
self.assertTrue('language' in item['body'], f"All vtt files should have a language: {item}")
if item['body']['language'] == 'cy':
self.assertEqual(item['body']['id'], 'https://archive.org/download/cruz-test/cruz-test.cy.vtt', 'Unexpected link for the Welsh vtt file')
self.assertEqual(item['body']['id'], 'https://localhost/iiif/resource/cruz-test/cruz-test.cy.vtt', 'Unexpected link for the Welsh vtt file')


if __name__ == '__main__':
Expand Down

0 comments on commit 65c97f9

Please sign in to comment.