auth/test: add missing module db setup
This commit is contained in:
parent
da4fb02423
commit
8a6417869d
1 changed files with 9 additions and 0 deletions
|
@ -9,6 +9,7 @@ from initdb import setup_database_for_testing, finished_database_for_testing
|
||||||
from util.morecollections import AttrDict
|
from util.morecollections import AttrDict
|
||||||
from util.security.registry_jwt import ANONYMOUS_SUB, build_context_and_subject
|
from util.security.registry_jwt import ANONYMOUS_SUB, build_context_and_subject
|
||||||
|
|
||||||
|
|
||||||
TEST_AUDIENCE = app.config['SERVER_HOSTNAME']
|
TEST_AUDIENCE = app.config['SERVER_HOSTNAME']
|
||||||
TEST_USER = AttrDict({'username': 'joeuser'})
|
TEST_USER = AttrDict({'username': 'joeuser'})
|
||||||
MAX_SIGNED_S = 3660
|
MAX_SIGNED_S = 3660
|
||||||
|
@ -16,6 +17,14 @@ TOKEN_VALIDITY_LIFETIME_S = 60 * 60 # 1 hour
|
||||||
ANONYMOUS_SUB = '(anonymous)'
|
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):
|
def _access(typ='repository', name='somens/somerepo', actions=None):
|
||||||
actions = [] if actions is None else actions
|
actions = [] if actions is None else actions
|
||||||
return [{
|
return [{
|
||||||
|
|
Reference in a new issue