test(quant): update test assertions for dynamic dates_utc and 32-day market history
This commit is contained in:
1 parent
7a016a6fbc
commit
25f61dac33
2 files changed
+7
-7
No files matched your search
@@ -315,7 +315,7 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
assert ts_full["periodicity_gate"]["enforced"] is True
|
||||
assert ts_full["periodicity_gate"]["non_periodic_records_ingested"] == 0
|
||||
assert ts_full["periodicity_gate"]["dated_news_dossiers_ingested"] >= 20
|
||||
assert len(ts_full["dates_utc"]) == 30
|
||||
assert len(ts_full["dates_utc"]) >= 30
|
||||
assert all(re.match(r"^\d{4}-\d{2}-\d{2}$", d) for d in ts_full["dates_utc"])
|
||||
assert len(ts_full["instruments"]) == 24
|
||||
|
||||
@@ -341,8 +341,8 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
|
||||
nvda_ts = next(x for x in ts_full["instruments"] if x["symbol"] == "NVDA")
|
||||
assert nvda_ts["data_available"] is True
|
||||
assert nvda_ts["available_trading_days"] == 19
|
||||
assert sum(1 for b in nvda_ts["bars"] if not b["data_available"] and b["status"] == NO_DATA_AVAILABLE) == 11
|
||||
assert nvda_ts["available_trading_days"] == 20
|
||||
assert sum(1 for b in nvda_ts["bars"] if not b["data_available"] and b["status"] == NO_DATA_AVAILABLE) == 12
|
||||
assert nvda_ts["tradingview_symbol"] == "NASDAQ:NVDA"
|
||||
assert "tradingview.com/chart/?symbol=NASDAQ%3ANVDA" in nvda_ts["tradingview_url"]
|
||||
assert "doc_references" in nvda_ts
|
||||
@@ -510,7 +510,7 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
assert cat_res["counts"]["kg_nodes"] == 388
|
||||
assert cat_res["counts"]["kg_edges"] == 1282
|
||||
assert cat_res["counts"]["dossiers"] >= 71
|
||||
assert cat_res["counts"]["quant_timeseries_bars"] == 720
|
||||
assert cat_res["counts"]["quant_timeseries_bars"] == 24 * len(ts_full["dates_utc"])
|
||||
|
||||
manifests = query_registry_manifests(cat_db)
|
||||
assert any(m["registry_slug"] == "encyclopedia-graph" and m["dag_json_cidv1"].startswith("baguqeera") for m in manifests)
|
||||
@@ -524,7 +524,7 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
assert len(coord_163["quant_timeseries_bars"]) >= 1
|
||||
|
||||
nvda_bars = query_timeseries_bars(symbol="NVDA", min_points=None, db_path=cat_db)
|
||||
assert len(nvda_bars) == 30 and sum(1 for b in nvda_bars if b["data_available"] == 1) == 19
|
||||
assert len(nvda_bars) == len(ts_full["dates_utc"]) and sum(1 for b in nvda_bars if b["data_available"] == 1) == 20
|
||||
assert any(b["contingent_points"] is None for b in nvda_bars if b["data_available"] == 0)
|
||||
|
||||
# Verify MCP and REST API calls automatically populate the SQLite REST API metadata database
|
||||
|
||||
Reference in new issue
Block a user