Commit 89d22942 by Tom Christie

Add missing docs on RequestsClient. Closes #4747.

parent 7ecd4f78
...@@ -205,7 +205,9 @@ Note that the requests client requires you to pass fully qualified URLs. ...@@ -205,7 +205,9 @@ Note that the requests client requires you to pass fully qualified URLs.
## `RequestsClient` and working with the database ## `RequestsClient` and working with the database
The `RequestsClient` class is useful if The `RequestsClient` class is useful if you want to write tests that solely interact with the service interface. This is a little stricter than using the standard Django test client, as it means that all interactions should be via the API.
If you're using `RequestsClient` you'll want to ensure that test setup, and results assertions are performed as regular API calls, rather than interacting with the database models directly. For example, rather than checking that `Customer.objects.count() == 3` you would list the customers endpoint, and ensure that it contains three records.
## Headers & Authentication ## Headers & Authentication
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment