1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

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 in 6e55e1d88a.
This commit is contained in:
Nicolas Delaby
2017-11-23 17:18:03 +01:00
committed by Tim Graham
parent 7a6fbf36b1
commit 746caf3ef8
6 changed files with 21 additions and 8 deletions

View File

@@ -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')