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 :)
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 :)