Thanks for sharing this, and capturing the lessons you learned along the way! I believe this example underscores the importance of targeted testing to confirm expected behavior.
Assuming that you have a mock setup for the test, some examples of tests that come to mind are:
Verify that there's only one call to the API when there's no next page token
Verify that sleeps happen when there's a next page token
Verify the number of calls to the API when there are multiple pages
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for sharing this, and capturing the lessons you learned along the way! I believe this example underscores the importance of targeted testing to confirm expected behavior.
Assuming that you have a mock setup for the test, some examples of tests that come to mind are: