Merge branch 'dev' into feature/auth-internal
This commit is contained in:
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -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"},
|
||||
|
Reference in New Issue
Block a user