From 7c7e2d691558300cb5114e6ad1cba08fc04b7213 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 8 Feb 2023 13:37:56 -0500 Subject: [PATCH] If you have an instance/config.py to override local development it would also override testing. --- .../src/spiffworkflow_backend/config/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py b/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py index 24fc452d..63ce21ee 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py @@ -91,6 +91,8 @@ def setup_config(app: Flask) -> None: # This allows config/testing.py or instance/config.py to override the default config if "ENV_IDENTIFIER" in app.config and app.config["ENV_IDENTIFIER"] == "testing": app.config.from_pyfile("config/testing.py", silent=True) + elif "ENV_IDENTIFIER" in app.config and app.config["ENV_IDENTIFIER"] == "unit_testing": + app.config.from_pyfile("config/unit_testing.py", silent=True) else: app.config.from_pyfile(f"{app.instance_path}/config.py", silent=True)