11 lines
248 B
Python
11 lines
248 B
Python
"""Scripted fake-model responses used by tests."""
|
|
|
|
STATE = {"calls": 0}
|
|
|
|
|
|
def invalid_then_valid(payload):
|
|
STATE["calls"] += 1
|
|
if STATE["calls"] == 1:
|
|
return {"content": "sorry, no JSON today"}
|
|
return {"content": '{"c": "x"}'}
|