mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[4.0.x] Fixed #33132 -- Fixed test client handling of querystring only redirects.
Regression in1e5aa8e1c7. Backport ofb1bf8c8a4bfrom main
This commit is contained in:
		
				
					committed by
					
						 Carlton Gibson
						Carlton Gibson
					
				
			
			
				
	
			
			
			
						parent
						
							715aa2db67
						
					
				
				
					commit
					5d36af6f6f
				
			| @@ -291,6 +291,13 @@ class ClientTest(TestCase): | ||||
|         self.assertEqual(response.status_code, 200) | ||||
|         self.assertEqual(response.request['PATH_INFO'], '/accounts/login/') | ||||
|  | ||||
|     def test_redirect_to_querystring_only(self): | ||||
|         """A URL that consists of a querystring only can be followed""" | ||||
|         response = self.client.post('/post_then_get_view/', follow=True) | ||||
|         self.assertEqual(response.status_code, 200) | ||||
|         self.assertEqual(response.request['PATH_INFO'], '/post_then_get_view/') | ||||
|         self.assertEqual(response.content, b'The value of success is true.') | ||||
|  | ||||
|     def test_follow_307_and_308_redirect(self): | ||||
|         """ | ||||
|         A 307 or 308 redirect preserves the request method after the redirect. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user