diff --git a/backend/.env.test b/backend/.env.test index a0c17077f..86bf7db22 100644 --- a/backend/.env.test +++ b/backend/.env.test @@ -2,7 +2,7 @@ # -- GENERAL -- # Logging level: DEBUG|INFO|WARNING|ERROR|CRITICAL -LOG_LEVEL=ERROR +LOG_LEVEL=DEBUG LOG_USE_STREAM=1 # -- FRONTEND -- @@ -90,7 +90,7 @@ GOOGLE_TEST_PASS= TEST_USER_EMAIL=test@example.org # -- Redis -- -REDIS_URL=localhost +REDIS_URL REDIS_PORT=6379 REDIS_DB=0 # No value = Python None diff --git a/backend/src/appointment/main.py b/backend/src/appointment/main.py index 8c9308332..c4506c463 100644 --- a/backend/src/appointment/main.py +++ b/backend/src/appointment/main.py @@ -38,7 +38,8 @@ def _common_setup(): # load any available .env into env - load_dotenv() + if os.getenv('APP_ENV') != APP_ENV_TEST: + load_dotenv() # This needs to be ran before any other imports normalize_secrets() diff --git a/backend/test/conftest.py b/backend/test/conftest.py index fafdf062b..4e6b7d971 100644 --- a/backend/test/conftest.py +++ b/backend/test/conftest.py @@ -23,7 +23,8 @@ from factory.invite_factory import make_invite # noqa: F401 # Load our env -load_dotenv(find_dotenv('.env.test')) +print("Conftes.py") +load_dotenv(find_dotenv('.env.test'), override=True) from appointment.main import server # noqa: E402 from appointment.database import models, repo, schemas # noqa: E402