test: Fix unawaited coroutine warnings in Ollama mock tests by Cristhianzl · Pull Request #11930 · langflow-ai/langflow (original) (raw)
Caution
Review failed
The pull request is closed.
ℹ️ Recent review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 6e95b7c and 0904405.
📒 Files selected for processing (2)
src/backend/tests/unit/components/embeddings/test_ollama_embeddings_component.pysrc/backend/tests/unit/components/languagemodels/test_chatollama_component.py
Walkthrough
Two test files update mock configuration for HTTP response handling by replacing raise_for_status.return_value = None with MagicMock(return_value=None). These changes are semantically equivalent and do not alter control flow or error handling behavior.
Changes
| Cohort / File(s) | Summary |
|---|---|
| Test Mock Configuration Updates src/backend/tests/unit/components/embeddings/test_ollama_embeddings_component.py, src/backend/tests/unit/components/languagemodels/test_chatollama_component.py | Updated mock setup for raise_for_status to use explicit MagicMock(return_value=None) instead of direct attribute assignment. Functionally equivalent changes affecting only test mocking configuration. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~8 minutes
✨ Finishing Touches
- 📝 Generate docstrings (stacked PR)
- 📝 Generate docstrings (commit on current branch) 🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
cz/fix-ollama-tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands and usage tips.