From de6fc80dbda12d0d0fe7d813d090467c2d9f3303 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Sat, 9 May 2026 05:28:09 +0530 Subject: [PATCH] chore: ran linting --- .../google_unification/test_drive_indexer_credentials.py | 4 +--- .../unit/google_unification/test_composio_credentials.py | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/surfsense_backend/tests/integration/google_unification/test_drive_indexer_credentials.py b/surfsense_backend/tests/integration/google_unification/test_drive_indexer_credentials.py index fceda8453..810c3ceab 100644 --- a/surfsense_backend/tests/integration/google_unification/test_drive_indexer_credentials.py +++ b/surfsense_backend/tests/integration/google_unification/test_drive_indexer_credentials.py @@ -41,9 +41,7 @@ _INDEXER_MODULE = "app.tasks.connector_indexers.google_drive_indexer" _GET_ACCESS_TOKEN = "app.services.composio_service.ComposioService.get_access_token" -def _mock_drive_client( - *, list_files_return: tuple = ([], None, None) -) -> MagicMock: +def _mock_drive_client(*, list_files_return: tuple = ([], None, None)) -> MagicMock: """Duck-typed client mock whose ``list_files`` yields the supplied tuple. Returning an empty file list short-circuits the indexer's full-scan diff --git a/surfsense_backend/tests/unit/google_unification/test_composio_credentials.py b/surfsense_backend/tests/unit/google_unification/test_composio_credentials.py index 32f42437d..7f6b0cd72 100644 --- a/surfsense_backend/tests/unit/google_unification/test_composio_credentials.py +++ b/surfsense_backend/tests/unit/google_unification/test_composio_credentials.py @@ -118,7 +118,7 @@ def test_get_access_token_raises_when_state_val_missing(): fake_account.state = None service = _service_with_account(fake_account) - with pytest.raises(ValueError, match="No state.val.*missing-state-account"): + with pytest.raises(ValueError, match=r"No state\.val.*missing-state-account"): service.get_access_token("missing-state-account") @@ -128,7 +128,7 @@ def test_get_access_token_raises_when_access_token_empty(): fake_account.state.val.access_token = "" service = _service_with_account(fake_account) - with pytest.raises(ValueError, match="No access_token.*missing-token-account"): + with pytest.raises(ValueError, match=r"No access_token.*missing-token-account"): service.get_access_token("missing-token-account") @@ -138,7 +138,7 @@ def test_get_access_token_raises_when_access_token_none(): fake_account.state.val.access_token = None service = _service_with_account(fake_account) - with pytest.raises(ValueError, match="No access_token.*none-token-account"): + with pytest.raises(ValueError, match=r"No access_token.*none-token-account"): service.get_access_token("none-token-account")