test: cover admin provider bootstrap marker

parent d6e4bb66
...@@ -601,6 +601,31 @@ def test_dashboard_providers_bootstrap_handles_quote_heavy_market_reference_data ...@@ -601,6 +601,31 @@ def test_dashboard_providers_bootstrap_handles_quote_heavy_market_reference_data
assert "alice" in parse_block assert "alice" in parse_block
def test_dashboard_admin_providers_bootstrap_uses_json_parse(monkeypatch):
db = MarketReferenceImportDbStub()
capture = TemplateCapture()
client = TestClient(app)
_set_session_cookie(
client,
{
"logged_in": True,
"username": "config-admin",
"role": "admin",
"expires_at": 4102444800,
},
)
monkeypatch.setattr(dashboard_market, "DatabaseRegistry", RegistryStub(db))
from aisbf.routes.dashboard import providers as dashboard_providers
monkeypatch.setattr(dashboard_providers, "DatabaseRegistry", RegistryStub(db))
monkeypatch.setattr(dashboard_providers, "_templates", capture)
response = client.get("/dashboard/providers")
assert response.status_code == 200
assert "let providersData = JSON.parse(" in response.text
def test_dashboard_rotations_renders_market_reference_alongside_local_rotation(monkeypatch): def test_dashboard_rotations_renders_market_reference_alongside_local_rotation(monkeypatch):
db = MarketReferenceImportDbStub() db = MarketReferenceImportDbStub()
_seed_dashboard_market_reference_mix(db) _seed_dashboard_market_reference_mix(db)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment