feat: Update CORS origins to allow Chrome extensions and improve logging in migration tool
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user