Live survival: no options route
This commit is contained in:
@@ -99,7 +99,6 @@ def live_client(client, monkeypatch):
|
||||
|
||||
monkeypatch.setattr(model_analysis, "_live_context", context)
|
||||
monkeypatch.setattr(live, "curves", curves)
|
||||
monkeypatch.setattr(live, "options", lambda labelled, pac_id=None: {"n": 100, "paciente": {"grade": "G2"} if pac_id == 7 else None})
|
||||
model_analysis._ANSWERS.clear()
|
||||
client.holder = holder
|
||||
return client
|
||||
@@ -125,12 +124,3 @@ def test_a_selection_that_cannot_be_answered_is_a_422_with_the_reason(live_clien
|
||||
answer = live_client.post("/cama/modelo/curvas/consulta", json={"filtros": {"er": ["NEGATIVO"]}})
|
||||
|
||||
assert answer.status_code == 422 and "3 pacientes" in answer.get_json()["error"]
|
||||
|
||||
|
||||
def test_the_options_carry_the_patients_own_values_when_one_is_named(live_client):
|
||||
"""Pins down: `GET /cama/modelo/curvas/opciones?paciente=7` carries patient 7's values, and without it none. Fails if the
|
||||
patient parameter is ignored, which would leave the dashboard unable to offer her subgroup."""
|
||||
named = live_client.get("/cama/modelo/curvas/opciones?paciente=7").get_json()
|
||||
plain = live_client.get("/cama/modelo/curvas/opciones").get_json()
|
||||
|
||||
assert named["opciones"]["paciente"] == {"grade": "G2"} and plain["opciones"]["paciente"] is None
|
||||
|
||||
Reference in New Issue
Block a user