Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaAutumn committed Jun 13, 2024
1 parent 0fdb501 commit 7e5d4da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# -- GENERAL --
# Logging level: DEBUG|INFO|WARNING|ERROR|CRITICAL
LOG_LEVEL=ERROR
LOG_LEVEL=DEBUG
LOG_USE_STREAM=1

# -- FRONTEND --
Expand Down Expand Up @@ -90,7 +90,7 @@ GOOGLE_TEST_PASS=
TEST_USER_EMAIL=[email protected]

# -- Redis --
REDIS_URL=localhost
REDIS_URL
REDIS_PORT=6379
REDIS_DB=0
# No value = Python None
Expand Down
3 changes: 2 additions & 1 deletion backend/src/appointment/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion backend/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e5d4da

Please sign in to comment.