Basic wrapper around Framework that implements unittest.TestCase and adds a variety of assertion methods.
Alias for delete() . assertCookie().
Alias for delete() . assertHeader().
Alias for delete() . assertInBody().
Alias for delete() . assertNotCookie().
Alias for delete() . assertNotHeader().
Alias for delete() . assertNotInBody().
Alias for delete() . assertNotStatus().
Alias for delete() . assertStatus().
Alias for get() . assertCookie().
Alias for get() . assertHeader().
Alias for get() . assertInBody().
Alias for get() . assertNotCookie().
Alias for get() . assertNotHeader().
Alias for get() . assertNotInBody().
Alias for get() . assertNotStatus().
Alias for get() . assertStatus().
Alias for post() . assertCookie().
Alias for post() . assertHeader().
Alias for post() . assertInBody().
Alias for post() . assertNotCookie().
Alias for post() . assertNotHeader().
Alias for post() . assertNotInBody().
Alias for post() . assertNotStatus().
Alias for post() . assertStatus().
Alias for put() . assertCookie().
Alias for put() . assertHeader().
Alias for put() . assertInBody().
Alias for put() . assertNotCookie().
Alias for put() . assertNotHeader().
Alias for put() . assertNotInBody().
Alias for put() . assertNotStatus().
Alias for put() . assertStatus().
This is a basic framework to automate interacting with any web service. It is intended to be used for integration testing, but in all reality, it can be used for anything that is consistantly making requests.
A full URL with protocol included. If the service is running on a non-standard port, it should be included as part of the URL:
http://someurl.com
https://super-service.com:123
URLs containing additional information (such as paths) will have it stripped:
http://something.com:8080/alternative/base
...would become:
http://something.com:8080
Invalid URLs will raise an assertion error.
Wrapper around make_request(), where method is DELETE.
Wrapper around make_request(), where method is GET.
Wrapper around make_request(), where method is POST.
Wrapper around make_request(), where method is PUT.
Makes the actual request. This will also go through and generate the needed steps to make the request, i.e. basic auth.
An important note is that when post_params is specified, its behavior depends on the method. That is, for PUT and POST requests, the dictionary is multipart encoded and put into the body of the request. For everything else, it is added as a query string to the URL.