T-24e: /metadatos trae figuras_detalle (qué muestra cada figura y cómo leerla)

CSO5.5
This commit is contained in:
2026-10-22 22:26:45 +00:00
parent df7f529e39
commit 8984c901c8
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -271,11 +271,14 @@ METADATOS = {
@pytest.mark.parametrize("indicador", sorted(DEFINICIONES))
def test_los_metadatos_traen_referencias_y_poblaciones_sin_perder_llaves(client, indicador):
def test_los_metadatos_traen_referencias_poblaciones_y_figuras_sin_perder_llaves(client, indicador):
cuerpo = _ruta(client, indicador, "metadatos").get_json()
assert set(cuerpo) == METADATOS | {"referencias", "poblaciones"}
assert set(cuerpo) == METADATOS | {"referencias", "poblaciones", "figuras_detalle"}
assert cuerpo["poblaciones"]
assert [d["figura"] for d in cuerpo["figuras_detalle"]] == cuerpo["figuras"]
if not DEFINICIONES[indicador].extension.publicacion.oculto:
assert all(d["descripcion"] and d["como_leer"] for d in cuerpo["figuras_detalle"])
assert all(set(p) == {"grupo", "codigo", "descripcion"} and p["descripcion"] for p in cuerpo["poblaciones"])