Imgur / imgurpython

Official Imgur python client library (deprecated)
MIT License
546 stars 116 forks source link

Adding Tests #28

Open ueg1990 opened 9 years ago

ueg1990 commented 9 years ago

I was thinking if we can add tests to the python library for Imgur API. To do this though, there are many options to consider. Since this an web API, results retrieved from requests will not always be the same. Some options to overcome this: 1) Creating a test database from which to test the API calls. Imgur may not need to provide this 2) Mocking up requests on which to run the API calls against? I know there is a mock library to Python that is used for that. I have never used it but if this a way to go I would like to give it a try 3) Create test albums/images etc. using the POST requests, test them and check if result is as expected. Then test GET/DELETE request functions on them and check if result is as required. My concern with this is that not all functions will be tested Let me know what you think :)

jasdev commented 9 years ago

@ueg1990 2) seems like the best route :+1:

kupiakos commented 8 years ago

PRAW uses betamax for its integration tests of different requests.