diff --git a/auth/test/test_registry_jwt.py b/auth/test/test_registry_jwt.py index a174cc324..9b1d6514f 100644 --- a/auth/test/test_registry_jwt.py +++ b/auth/test/test_registry_jwt.py @@ -9,6 +9,7 @@ from initdb import setup_database_for_testing, finished_database_for_testing from util.morecollections import AttrDict from util.security.registry_jwt import ANONYMOUS_SUB, build_context_and_subject + TEST_AUDIENCE = app.config['SERVER_HOSTNAME'] TEST_USER = AttrDict({'username': 'joeuser'}) MAX_SIGNED_S = 3660 @@ -16,6 +17,14 @@ TOKEN_VALIDITY_LIFETIME_S = 60 * 60 # 1 hour ANONYMOUS_SUB = '(anonymous)' +def setup_module(m): + setup_database_for_testing(m) + + +def teardown_module(m): + finished_database_for_testing(m) + + def _access(typ='repository', name='somens/somerepo', actions=None): actions = [] if actions is None else actions return [{