testing
parent
b87379c66a
commit
22514a4d6d
|
@ -0,0 +1 @@
|
|||
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
|
|
@ -1,3 +1,5 @@
|
|||
import os
|
||||
os.environ['TESTING'] = 'yes'
|
||||
from io import BytesIO
|
||||
import pytest
|
||||
|
||||
|
|
|
@ -1,13 +1,23 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
from environs import Env
|
||||
from logging import getLogger
|
||||
logger = getLogger(__file__)
|
||||
|
||||
|
||||
def read_private_key_file(path):
|
||||
with open(path) as f:
|
||||
return f.read()
|
||||
|
||||
|
||||
env = Env()
|
||||
env.read_env("auth.cfg")
|
||||
|
||||
if 'TESTING' in os.environ:
|
||||
test_path = Path(__file__).parents[1] / 'auth.cfg.test'
|
||||
logger.warning("loading %s", test_path)
|
||||
env.read_env(test_path, recurse=False, override=True)
|
||||
|
||||
STRIP_RE = env.str("STRIP_RE")
|
||||
LDAP_URL = env.str("LDAP_URL")
|
||||
DN_STRING = env.str("DN_STRING")
|
||||
|
|
Loading…
Reference in New Issue