salesforce-marketingcloud / FuelSDK-Python

FuelSDK for python
Other
126 stars 193 forks source link

Add some basic unit tests #5

Open btimby opened 11 years ago

btimby commented 11 years ago

I just added some unit tests to another API client I use in my project. I used an excellent HTTP server mock utility called HTTPretty. It makes it easy to test an HTTP client against a fake server. You can return any arbitrary fake HTTP response and make assertions against the client's handling of those responses.

https://github.com/gabrielfalcao/HTTPretty

These tests were written only to test the basic functionality I needed (and some changes I made to the library, so they are not a good example of full tests, but a good starting point).

https://github.com/btimby/contactology/blob/master/tests.py