Skip to content

Commit ec398fd

Browse files
committed
fix: test without google creds
1 parent 2f3db62 commit ec398fd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

backend/tests/test_chat.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ def test_chat_view_dispatch_request_streams_response(
9292
):
9393
"""Test that sends a message to the API, mocks vertexai response, and validates output."""
9494

95+
# Mock Google service account credentials
96+
mock_credentials = mocker.Mock()
97+
mocker.patch(
98+
"tenantfirstaid.chat.service_account.Credentials.from_service_account_file",
99+
return_value=mock_credentials,
100+
)
101+
95102
# Mock the entire RAG module components to avoid actual RAG retrieval
96103
mock_rag_resource = mocker.Mock()
97104
mock_rag_store = mocker.Mock()

0 commit comments

Comments
 (0)