algolia / algoliasearch-client-python

⚡️ A fully-featured and blazing-fast Python API client to interact with Algolia.
https://www.algolia.com/doc/api-client/getting-started/install/python/?language=python
MIT License
196 stars 67 forks source link

test: prevent error in CTS personalization test on 429 HTTP code #503

Closed aseure closed 4 years ago

aseure commented 4 years ago

The personalization API is now limiting the number of set_personalization_strategy() successful calls to 15 per day. Because of that, our integration tests against the real API is not returning the following error very often on our testing application:

{
    "status": 429,
    "message": "Number of strategy saves exceeded for the day"
}

Because of that, if the CTS is implemented in the client, we need to perform the set_personalization_strategy() call in our integration test like before but to prevent the test from failing if the 429 error is returned (considered it as a "success" and moving on with the get_personalization_strategy() call).