Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
Signed-off-by: viste <[email protected]>
  • Loading branch information
Viste committed Aug 20, 2024
1 parent a54b974 commit 760e7c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_vk_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_authorize_vk_success(mock_setup_routes, client):
with patch('tools.auth.authenticate_vk_user') as mock_authenticate:
response = client.get('/vk/callback')
assert response.status_code == 302 # Redirects after successful login
assert mock_authenticate.called_once_with(
mock_authenticate.assert_called_once_with(
12345, 'john_doe', 'John', 'Doe', 'https://i.pinimg.com/736x/90/bd/09/90bd09bc51dba0bd127db954591d3650.jpg', '[email protected]'
)

Expand All @@ -54,7 +54,7 @@ def test_authorize_vk_no_token(mock_setup_routes, client):
response = client.get('/vk/callback')

assert response.status_code == 302
assert b'login' in response.location
assert 'login' in response.location


@patch('app.setup_routes')
Expand All @@ -73,4 +73,4 @@ def test_authorize_vk_profile_failure(mock_setup_routes, client):
response = client.get('/vk/callback')

assert response.status_code == 302
assert b'login' in response.location
assert 'login' in response.location

0 comments on commit 760e7c1

Please sign in to comment.