mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[4.1.x] Refs #18707 -- Corrected django.test.Client signature in docs.
Backport of 6f49b7b69b from main
			
			
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							dafdcedaf3
						
					
				
				
					commit
					2984e17c64
				
			| @@ -109,7 +109,7 @@ Making requests | ||||
|  | ||||
| Use the ``django.test.Client`` class to make requests. | ||||
|  | ||||
| .. class:: Client(enforce_csrf_checks=False, json_encoder=DjangoJSONEncoder, **defaults) | ||||
| .. class:: Client(enforce_csrf_checks=False, raise_request_exception=True, json_encoder=DjangoJSONEncoder, **defaults) | ||||
|  | ||||
|     It requires no arguments at time of construction. However, you can use | ||||
|     keyword arguments to specify some default headers. For example, this will | ||||
| @@ -125,13 +125,13 @@ Use the ``django.test.Client`` class to make requests. | ||||
|     The ``enforce_csrf_checks`` argument can be used to test CSRF | ||||
|     protection (see above). | ||||
|  | ||||
|     The ``json_encoder`` argument allows setting a custom JSON encoder for | ||||
|     the JSON serialization that's described in :meth:`post`. | ||||
|  | ||||
|     The ``raise_request_exception`` argument allows controlling whether or not | ||||
|     exceptions raised during the request should also be raised in the test. | ||||
|     Defaults to ``True``. | ||||
|  | ||||
|     The ``json_encoder`` argument allows setting a custom JSON encoder for | ||||
|     the JSON serialization that's described in :meth:`post`. | ||||
|  | ||||
|     Once you have a ``Client`` instance, you can call any of the following | ||||
|     methods: | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user