Skip to content

Commit

Permalink
Prevent some leaky test scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Eardley committed Oct 7, 2024
1 parent 468e5fd commit 600f92a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
19 changes: 10 additions & 9 deletions doajtest/unit/api_tests/test_api_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ def setUpClass(cls):
# Turn off debug so we're allowed to add these routes after the app has been used in other tests
cls.app_test.debug = False

@cls.app_test.route('/hello')
@api_key_required
def hello_world():
return Response("hello, world!")

@cls.app_test.route('/helloopt')
@api_key_optional
def hello_world_opt():
return Response("hello, world!")
with cls.app_test.app_context():
@cls.app_test.route('/hello')
@api_key_required
def hello_world():
return Response("hello, world!")

@cls.app_test.route('/helloopt')
@api_key_optional
def hello_world_opt():
return Response("hello, world!")

# Reinstate debug
cls.app_test.debug = True
Expand Down
4 changes: 2 additions & 2 deletions doajtest/unit/test_prune_marvel.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import datetime, calendar
from dateutil.relativedelta import relativedelta
from freezegun import freeze_time
from unittest import TestCase

from doajtest.helpers import DoajTestCase
from portality.lib.dates import FMT_DATE_YMDOT
from portality.scripts.prune_marvel import generate_delete_pattern


class TestPruneMarvel(DoajTestCase):
class TestPruneMarvel(TestCase):

@classmethod
def setUpClass(cls):
Expand Down

0 comments on commit 600f92a

Please sign in to comment.