Merge branch 'dev' into feature/auth-internal

This commit is contained in:
2025-05-22 00:24:06 +03:00
6 changed files with 26 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ def oauth_settings() -> Dict[str, Dict[str, str]]:
@pytest.fixture
def frontend_url() -> str:
"""URL фронтенда для тестов"""
return "http://localhost:3000"
return "https://localhost:3000"
@pytest.fixture(autouse=True)

View File

@@ -6,7 +6,7 @@ from auth.oauth import get_user_profile, oauth_login, oauth_callback
# Подменяем настройки для тестов
with (
patch("auth.oauth.FRONTEND_URL", "http://localhost:3000"),
patch("auth.oauth.FRONTEND_URL", "https://localhost:3000"),
patch(
"auth.oauth.OAUTH_CLIENTS",
{
@@ -208,9 +208,7 @@ with (
# Мокаем существующего пользователя
existing_user = MagicMock()
session = MagicMock()
session.query.return_value.filter.return_value.first.return_value = (
existing_user
)
session.query.return_value.filter.return_value.first.return_value = existing_user
mock_session.return_value.__enter__.return_value = session
response = await oauth_callback(mock_request)

View File

@@ -1,6 +1,6 @@
"""Тестовые настройки для OAuth"""
FRONTEND_URL = "http://localhost:3000"
FRONTEND_URL = "https://localhost:3000"
OAUTH_CLIENTS = {
"GOOGLE": {"id": "test_google_id", "key": "test_google_secret"},