Harden fetcher + add live smoke tests
- Exponential backoff: retry waits are now 1s, 2s, 4s (was linear 1s, 2s, 3s) - Cache poisoning prevention: validate Content-Type is not HTML before JSON parse, reject non-dict/list responses before caching - Add 18 live smoke tests against real public APIs (USGS, CoinGecko, Yahoo Finance, SEC EDGAR, FAA, NOAA SWPC, Hacker News, NASA EONET, etc.) - Smoke tests excluded from default pytest run; opt-in with: pytest -m smoke - All 220 unit tests + 18 smoke tests pass
This commit is contained in:
+4
-1
@@ -47,4 +47,7 @@ packages = ["src/world_intel_mcp"]
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
testpaths = ["src/world_intel_mcp/tests"]
|
||||
addopts = "-v --tb=short"
|
||||
addopts = "-v --tb=short -m 'not smoke'"
|
||||
markers = [
|
||||
"smoke: live API tests (deselected by default, run with: pytest -m smoke)",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user