Skip to content

Commit 5a3ba3f

Browse files
committed
fix: mark all SwaraClient() auth tests as integration
- All logout tests trigger auto_login on SwaraClient() initialization - These tests would fail in CI without authentication credentials - Marking as integration tests excludes them from PR workflows
1 parent cd578f6 commit 5a3ba3f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

idtap/tests/auth_logout_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
class TestLogoutFunctionality:
1010
"""Test cases for the logout method."""
1111

12+
@pytest.mark.integration
1213
@patch('idtap.client.login_google')
1314
def test_logout_success(self, mock_login):
1415
"""Test successful logout."""
@@ -36,6 +37,7 @@ def test_logout_success(self, mock_login):
3637
assert client.user is None
3738
client.secure_storage.clear_tokens.assert_called_once()
3839

40+
@pytest.mark.integration
3941
@patch('idtap.client.login_google')
4042
def test_logout_cancelled(self, mock_login):
4143
"""Test logout cancellation."""
@@ -62,6 +64,7 @@ def test_logout_cancelled(self, mock_login):
6264
assert client.user == {'name': 'Test User', '_id': 'test123'}
6365
client.secure_storage.clear_tokens.assert_not_called()
6466

67+
@pytest.mark.integration
6568
@patch('idtap.client.login_google')
6669
def test_logout_programmatic(self, mock_login):
6770
"""Test programmatic logout without confirmation."""
@@ -87,6 +90,7 @@ def test_logout_programmatic(self, mock_login):
8790
assert client.user is None
8891
client.secure_storage.clear_tokens.assert_called_once()
8992

93+
@pytest.mark.integration
9094
@patch('idtap.client.login_google')
9195
def test_logout_storage_failure(self, mock_login):
9296
"""Test logout when storage clearing fails."""
@@ -110,6 +114,7 @@ def test_logout_storage_failure(self, mock_login):
110114
assert result is False
111115
client.secure_storage.clear_tokens.assert_called_once()
112116

117+
@pytest.mark.integration
113118
@patch('idtap.client.login_google')
114119
def test_logout_exception_handling(self, mock_login):
115120
"""Test logout exception handling."""

0 commit comments

Comments
 (0)