Merge: Mock Github API tests
authorJean Privat <jean@pryen.org>
Wed, 3 Jul 2019 18:50:53 +0000 (14:50 -0400)
committerJean Privat <jean@pryen.org>
Wed, 3 Jul 2019 18:50:53 +0000 (14:50 -0400)
commit10211b46bacf5a6ec27621ad44f9e3ddf5c99afd
tree21328511d67fbeec91fee907f0683636755799d5
parent3e634a74ffbeb9d67045c8f793379bfdcf721224
parent4e3c688d2c4b875c00f206eb4c4b6f2c4f34c096
Merge: Mock Github API tests

This PR adds a mock to GithubAPI so we can avoid sending requests to the API on CI.

For each API call we save the actual Github response body from the API and reuse it during the tests.
The attribute `update_responses_cache` can be set to `true` so the cache files are updated from the API when `nitunit` is called.

Pull-Request: #2753
Reviewed-by: Jean Privat <jean@pryen.org>