feat: Update CORS origins to allow Chrome extensions and improve logging in migration tool
Some checks failed
Backend CI / lint (push) Failing after 10s
Backend CI / test (push) Failing after 1m37s

This commit is contained in:
JSC
2025-09-19 16:41:11 +02:00
parent 1bef694f38
commit bccfcafe0e
9 changed files with 72 additions and 32 deletions

View File

@@ -196,7 +196,7 @@ class TestApiTokenDependencies:
) -> None:
"""Test flexible authentication falls back to JWT when no API token."""
# Mock the get_current_user function (normally imported)
with pytest.raises(Exception, match="Database error|Could not validate"):
with pytest.raises(Exception, match=r"Database error|Could not validate"):
# This will fail because we can't easily mock the get_current_user import
# In a real test, you'd mock the import or use dependency injection
await get_current_user_flexible(mock_auth_service, "jwt_token", None)

View File

@@ -110,7 +110,7 @@ class TestUserRepository:
test_session: AsyncSession,
) -> None:
"""Test creating a new user."""
free_plan, pro_plan = ensure_plans
free_plan, _pro_plan = ensure_plans
plan_id = free_plan.id
plan_credits = free_plan.credits

View File

@@ -42,7 +42,7 @@ class TestAuthService:
assert response.user.role == "admin" # First user gets admin role
assert response.user.is_active is True
# First user gets pro plan
free_plan, pro_plan = ensure_plans
_free_plan, pro_plan = ensure_plans
assert response.user.credits == pro_plan.credits
assert response.user.plan["code"] == pro_plan.code