An eval suite grows one case at a time: every bug a customer reports becomes a new row. If each row needs a new test function, nobody adds rows. The usual fix is to keep cases in a data file and drive one test from it.
cases.jsonl holds one JSON object per line: an id, a question, phrases the reply must_contain, and phrases it must_not_contain.
Your task
- Replace the three hand-written tests with one test that pytest runs once per row of
cases.jsonl(@pytest.mark.parametrize), using each row'sidas the test id. - Give the test the API client through a pytest fixture called
client. - Check every phrase in both lists, ignoring upper and lower case.
On submit, the file may contain rows you have not seen. Your test must pick them up without any change to the code.