mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	[2.0.x] Fixed #28837 -- Fixed test client crash if an exception with more than one arg is raised.
Also removed usage of the problematic pattern elsewhere. Regression in6e55e1d88a. Backport of746caf3ef8from master
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							aba31aa86b
						
					
				
				
					commit
					ae4132a940
				
			| @@ -331,3 +331,12 @@ def django_project_redirect(request): | ||||
| def upload_view(request): | ||||
|     """Prints keys of request.FILES to the response.""" | ||||
|     return HttpResponse(', '.join(request.FILES)) | ||||
|  | ||||
|  | ||||
| class TwoArgException(Exception): | ||||
|     def __init__(self, one, two): | ||||
|         pass | ||||
|  | ||||
|  | ||||
| def two_arg_exception(request): | ||||
|     raise TwoArgException('one', 'two') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user