TradingAgents/tests
google-labs-jules[bot] bdaf188b33 Fix Finnhub API error handling and add coverage
Extracted the API request logic in `finnhub_news.py` to a private `_fetch_company_news_data` helper to properly catch `Exception` and return an empty list without violating the `str` return type of the main `get_company_news` function. Explicitly allows `ThirdPartyTimeoutError` to propagate to preserve timeout behavior.

Added corresponding tests to mock generic API exceptions and invalid response types. Retained the test verifying fallback behavior for invalid numeric values within `get_insider_transactions`.

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
2026-03-21 14:51:29 +00:00
..
cassettes Add integration and unit tests for scanner routing, TTM analysis, vendor fail-fast, and yfinance data layer 2026-03-19 13:51:57 +01:00
e2e refactor(tests): consolidate live-API tests into integration/, move mocked tests to unit/ 2026-03-19 14:24:52 +01:00
integration fix(tests): complete PR #26 — enforce socket isolation in unit tier and add test suite reference doc (#30) 2026-03-19 17:41:25 +01:00
portfolio Merge pull request #37 from aguzererler/fix-max-positions-validation-test-9122767223538480688 2026-03-21 02:36:49 +01:00
unit Fix Finnhub API error handling and add coverage 2026-03-21 14:51:29 +00:00
__init__.py Initial plan for portfolio manager phases 2-5 2026-03-20 14:27:37 +00:00
conftest.py fix(tests): complete PR #26 — enforce socket isolation in unit tier and add test suite reference doc (#30) 2026-03-19 17:41:25 +01:00