tests-upgrade
All checks were successful
Deploy on push / deploy (push) Successful in 57m1s

This commit is contained in:
2025-09-25 09:40:12 +03:00
parent 1992434a13
commit ac0111cdb9
17 changed files with 766 additions and 363 deletions

View File

@@ -97,7 +97,7 @@ class TestOAuthFunctional:
body = response.body
if isinstance(body, memoryview):
body = bytes(body)
assert b"Invalid or expired OAuth state" in body
assert b"oauth_state_expired" in body # 🔍 Проверяем новый формат ошибки
@pytest.mark.asyncio
async def test_oauth_callback_success_session_free(self):
@@ -163,8 +163,11 @@ class TestOAuthFunctional:
assert isinstance(response, RedirectResponse)
assert response.status_code == 307
# Проверяем URL редиректа
assert response.headers["location"] == "https://localhost:3000"
# Проверяем URL редиректа (теперь с параметрами)
redirect_url = response.headers["location"]
assert redirect_url.startswith("https://localhost:3000")
assert "access_token=" in redirect_url # 🔍 Проверяем наличие токена
assert "state=valid_state" in redirect_url # 🔍 Проверяем state
# Проверяем что токен получен без использования request.session
mock_client.fetch_access_token.assert_called_once_with(