Skip to content

Commit 0c37c36

Browse files
Set BASE_URL in the test setup
1 parent 2ba1c9c commit 0c37c36

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

routers/core/account.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,13 @@ async def login(
386386
logger.error("User has no ID during invitation processing.")
387387
raise DataIntegrityError(resource="User ID")
388388
except Exception as e:
389-
logger.error(
390-
"Error processing invitation during login: {e}",
391-
exc_info=True
392-
)
393-
session.rollback()
394-
# Raise the specific invitation processing error
395-
raise InvitationProcessingError()
389+
logger.error(
390+
f"Error processing invitation during login: {e}",
391+
exc_info=True
392+
)
393+
session.rollback()
394+
# Raise the specific invitation processing error
395+
raise InvitationProcessingError()
396396

397397
else:
398398
logger.info(f"Standard login for account {account.email}. Redirecting to dashboard.")

tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ def env_vars(monkeypatch):
2424

2525
# monkeypatch remaining env vars
2626
with monkeypatch.context() as m:
27-
m.setenv("SECRET_KEY", "testsecretkey")
28-
m.setenv("HOST_NAME", "Test Organization")
2927
# Get valid db user, password, host, and port from env
3028
m.setenv("DB_HOST", os.getenv("DB_HOST", "localhost"))
3129
m.setenv("DB_PORT", os.getenv("DB_PORT", "5432"))
3230
m.setenv("DB_USER", os.getenv("DB_USER", "appuser"))
3331
m.setenv("DB_PASSWORD", os.getenv("DB_PASSWORD", "testpassword"))
32+
m.setenv("SECRET_KEY", "testsecretkey")
33+
m.setenv("HOST_NAME", "Test Organization")
3434
m.setenv("DB_NAME", "qual2db4-test-db")
3535
m.setenv("RESEND_API_KEY", "test")
3636
m.setenv("EMAIL_FROM", "[email protected]")
3737
m.setenv("QUALTRICS_BASE_URL", "test")
3838
m.setenv("QUALTRICS_API_TOKEN", "test")
39+
m.setenv("BASE_URL", "http://localhost:8000")
3940
yield
4041

4142

0 commit comments

Comments
 (0)