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> |
||
|---|---|---|
| .. | ||
| cassettes | ||
| e2e | ||
| integration | ||
| portfolio | ||
| unit | ||
| __init__.py | ||
| conftest.py | ||