-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support stubbing AppStoreServerAPIClient for unit tests #24
Comments
@WFT currently how the unit tests are constructed, either directly or through subclassing you can override the direct method used to make the HTTP call, do any validation required on the inputs, and then return any arbitrary response app-store-server-library-python/tests/test_api_client.py Lines 381 to 405 in 2d11b06
|
@alexanderjordanbaker Yeah I think that makes sense. In my codebase I've just been using a general-purpose HTTP mocking library (https://github.com/gabrielfalcao/HTTPretty -- wish it were a little more maintained). I think that to make a really great testing experience though, it'd be nice if we could get it into this library. |
Feature request: I'd like the ability to create mock responses to API client calls which will be returned by the next call to a specific client method.
Use case
I would like to do unit testing for my server's use of the library. I want to test the following features of my server:
Example code
Here's an example test one could write:
The text was updated successfully, but these errors were encountered: