diff options
| -rw-r--r-- | gn_auth/__init__.py | 4 | ||||
| -rw-r--r-- | tests/unit/conftest.py | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/gn_auth/__init__.py b/gn_auth/__init__.py index f015e5e..d03c9ef 100644 --- a/gn_auth/__init__.py +++ b/gn_auth/__init__.py @@ -100,14 +100,14 @@ def create_app(config: Optional[dict] = None) -> Flask: # ====== Setup configuration ====== app.config.from_object(settings) # Default settings - # Override defaults with startup settings - app.config.update(config or {}) # Override app settings with site-local settings if "GN_AUTH_CONF" in os.environ: app.config.from_envvar("GN_AUTH_CONF") override_settings_with_envvars(app) + # Override defaults with startup settings + app.config.update(config or {}) load_secrets_conf(app) # ====== END: Setup configuration ====== diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index c6abc65..53ee062 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -30,8 +30,7 @@ def fxtr_app(): f'testdb_{datetime.now().strftime("%Y%m%dT%H%M%S")}') testuploadsdir = Path(testdir).joinpath("uploads") testuploadsdir.mkdir() - app = create_app() - app.config.update({ + app = create_app({ "TESTING": True, "AUTH_DB": testdb, "GN_AUTH_SECRETS": str(setup_secrets(testdir)), |
