chenwardT / lol_stats2

Website to perform match aggregation and analysis for Riot Games' League of Legends.
2 stars 0 forks source link

Solution for tests involving remote API calls #26

Open chenwardT opened 8 years ago

chenwardT commented 8 years ago

Tests run with CELERY_ALWAYS_EAGER set, and so don't go through the queue; they are run locally/immediately. This means they are not rate limited and thus cannot be used against Riot's API.

Furthermore, Riot's API is not up 100% of the time. If it were to go down during a CI test run, especially in a remotely hosted environment (e.g. TravisCI), it could get annoying to have to determine when Riot's service is back up and trigger re-runs.

One solution is mocking Riot's REST service.