mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-01 00:17:40 +03:00 
			
		
		
		
	Add missing docs on RequestsClient. Closes #4747.
This commit is contained in:
		
							parent
							
								
									7ecd4f7813
								
							
						
					
					
						commit
						89d22942a6
					
				|  | @ -205,7 +205,9 @@ Note that the requests client requires you to pass fully qualified URLs. | |||
| 
 | ||||
| ## `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 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user