Testing a function that calls paginated api multiple times

I have a function that calls a paginated list api multiple times, accumulates the result and then returns it. I have implemented it as a recursive function which updates the cursor on each call and exits when we get an empty array.
Now I need to test this api. I have tried ex_vcr but the problem is that it records and returns the same result again and again. So we never get the empty response and it becomes an infinite recursion.
Can you please help me with a way to test the above function ?

hi @Mukulch15 , ExVCR — exvcr v0.13.3 documentacion have a section called “Matching Options”, maybe not caught your requests

1 Like