-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa018e3
commit dbe4037
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import os | ||
os.environ["FLASK_CACHE_DISABLE"] = "true" | ||
|
||
import unittest | ||
from flask.testing import FlaskClient | ||
from iiify.app import app | ||
|
||
class TestImages(unittest.TestCase): | ||
|
||
def setUp(self) -> None: | ||
self.test_app = FlaskClient(app) | ||
|
||
def test_v3_resolving(self): | ||
resp = self.test_app.get("/iiif/3/jewishinterpreta00morg$267/info.json") | ||
self.assertEqual(resp.status_code, 302) | ||
self.assertEqual("https://iiif.archive.org/image/iiif/3/jewishinterpreta00morg%2fjewishinterpreta00morg_jp2.zip%2fjewishinterpreta00morg_jp2%2fjewishinterpreta00morg_0267.jp2/info.json", resp.location, "Expected to be redirected to full JSON URl.") | ||
|
||
def test_v2_resolving(self): | ||
resp = self.test_app.get("/iiif/2/jewishinterpreta00morg$267/info.json") | ||
self.assertEqual(resp.status_code, 302) | ||
self.assertEqual("https://iiif.archive.org/image/iiif/2/jewishinterpreta00morg%2fjewishinterpreta00morg_jp2.zip%2fjewishinterpreta00morg_jp2%2fjewishinterpreta00morg_0267.jp2/info.json", resp.location, "Expected to be redirected to full JSON URl.") | ||
|
||
|
||
|