fix: declare static agent routes before dynamic id route
This commit is contained in:
@@ -186,6 +186,27 @@ def test_agents_render_separate_health_and_fiscal_status_with_server_sort():
|
||||
assert 'value="worst_coverage"' in response.text
|
||||
|
||||
|
||||
def test_agent_list_and_detail_show_nao_informado_when_snapshot_missing():
|
||||
client, agent_id, _ = _panel_client()
|
||||
with client._session_factory() as session:
|
||||
installation = session.scalar(select(Installation).where(Installation.agent_id == agent_id))
|
||||
session.query(AgentSnapshot).filter(AgentSnapshot.installation_id == installation.id).delete()
|
||||
session.commit()
|
||||
|
||||
listing = client.get("/agents")
|
||||
assert listing.status_code == 200
|
||||
assert "None completos" not in listing.text
|
||||
assert "None bloqueados" not in listing.text
|
||||
assert ">None<" not in listing.text
|
||||
assert "Não informado" in listing.text
|
||||
|
||||
detail = client.get(f"/agents/{agent_id}")
|
||||
assert detail.status_code == 200
|
||||
assert ">None<" not in detail.text
|
||||
assert "None completos" not in detail.text
|
||||
assert "Não informado" in detail.text
|
||||
|
||||
|
||||
def test_agent_list_hides_technical_uuid_and_explains_remainder():
|
||||
client, agent_id, _ = _panel_client()
|
||||
with client._session_factory() as session:
|
||||
|
||||
Reference in New Issue
Block a user