External service Test Client
The inbuilt test client can be used to only test single domain applications ie no support for supplying absolute URLs. But there are cases where one might like to test against URL rewrites, external domains/services like OpenID, OAuth etc. This client has an external dependency on httplib2, to maintain the sessions (cookie-based). The API is exactly similar to the inbuilt test client. >>> from client import TestClient >>> c = TestClient() >>> resp = c.get("http://www.google.com/") >>> resp.status_code 200 **Note**: Unlike the built-in test client, this test client cannot access the template and context attributes from the response even if testing a local application.
- test
- client
- httplib2