Skip to content

Commit

Permalink
Set cache disable env var in all test suites (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldogsbody committed May 23, 2024
1 parent 9e173b6 commit 482319f
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
os.environ["FLASK_CACHE_DISABLE"] = "true"

import unittest
from flask.testing import FlaskClient
from iiify.app import app
Expand All @@ -8,6 +11,7 @@ class TestBasic(unittest.TestCase):
def setUp(self) -> None:
self.test_app = FlaskClient(app)


def test_documentation(self):
resp = self.test_app.get("/iiif/documentation")
self.assertEqual(resp.status_code, 200)
Expand Down
3 changes: 3 additions & 0 deletions tests/test_cantaloupe_resolver.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
os.environ["FLASK_CACHE_DISABLE"] = "true"

import unittest
from iiify.resolver import cantaloupe_resolver

Expand Down
4 changes: 3 additions & 1 deletion tests/test_collections.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os
os.environ["FLASK_ENV"] = "testing"

import unittest
from flask.testing import FlaskClient
from iiify.app import app

class TestCollections(unittest.TestCase):

def setUp(self) -> None:
Expand Down
3 changes: 3 additions & 0 deletions tests/test_linking.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
os.environ["FLASK_CACHE_DISABLE"] = "true"

import unittest
from flask.testing import FlaskClient
from iiify.app import app
Expand Down
3 changes: 3 additions & 0 deletions tests/test_manifests.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
os.environ["FLASK_CACHE_DISABLE"] = "true"

import unittest
from flask.testing import FlaskClient
from iiify.app import app
Expand Down
3 changes: 3 additions & 0 deletions tests/test_manifests_v2.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
os.environ["FLASK_CACHE_DISABLE"] = "true"

import unittest
from flask.testing import FlaskClient
from iiify.app import app
Expand Down
3 changes: 3 additions & 0 deletions tests/test_resolver.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
os.environ["FLASK_CACHE_DISABLE"] = "true"

import unittest
from iiify.resolver import purify_domain, collection, manifest_page

Expand Down
3 changes: 3 additions & 0 deletions tests/test_video.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
os.environ["FLASK_CACHE_DISABLE"] = "true"

import unittest
from flask.testing import FlaskClient
from iiify.app import app
Expand Down

0 comments on commit 482319f

Please sign in to comment.