You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A fake answers the same path the same way forever #326
fakeGET holds one answer per path, so a fake answers the same way however many times it's called. That leaves out every test where the point is that the second call differs.
Pagination is the case. Page one comes back with items 1, 2, 3 and page two with 3, 4, 5 — the same item on both, because the backend paginates a moving list. The bug being tested for only exists in how the two answers meet, and there's no way to describe that through the fake system today.
Whether a sequence is its own registration or the existing fakeGET overloads grow an array variant. The array variant reads better but multiplies the overload set, which is already wide across the five verbs.
What happens once the sequence runs out — repeat the last answer, or fail the request. Repeating is forgiving and matches how a real last page behaves; failing catches a test that expected more calls than it registered.
The same applies to fakePOST and friends, though pagination makes GET the one that actually needs it.
Activity