Skip to content

test: mock GOOGLE_API_KEY in API and integration tests to satisfy con…#65

Merged
stenwire merged 1 commit intodevfrom
whatsapp-intg-v1
Apr 7, 2026
Merged

test: mock GOOGLE_API_KEY in API and integration tests to satisfy con…#65
stenwire merged 1 commit intodevfrom
whatsapp-intg-v1

Conversation

@stenwire
Copy link
Copy Markdown
Owner

@stenwire stenwire commented Apr 7, 2026

…figuration requirements

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

🤖 Hi @stenwire, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## 📋 Review Summary

Overall, the changes in this PR are good. Mocking the GOOGLE_API_KEY in tests is a good practice to avoid hitting the actual API and to make the tests more reliable.

🔍 General Feedback

  • The changes are consistent across all the test files.
  • The use of patch is correct.

# 3. Chat
with patch("app.api.routes.run_conversation", return_value="Bot says hi") as mock_chat:
# 3. Chat — patch API key so it reaches the mocked run_conversation
with patch("app.api.routes.settings") as mock_settings, \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Looks good! Mocking the API key in tests is a good practice.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## 📋 Security Analysis Summary
    I have analyzed the changes in this pull request and found no security vulnerabilities. The changes correctly mock the `GOOGLE_API_KEY` in the tests, which is a good security practice.

    ## 🔍 General Feedback

    - The changes are well-structured and improve the test suite.
    - No new dependencies are introduced.
    </SUMMARY>

@stenwire stenwire merged commit 8b80b89 into dev Apr 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant