From 8a6417869dce3f48baaf09156127de98e31b73a5 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Thu, 6 Jul 2017 14:09:02 -0400 Subject: [PATCH] auth/test: add missing module db setup --- auth/test/test_registry_jwt.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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 [{