summaryrefslogtreecommitdiff
path: root/tests/httpwrappers
diff options
context:
space:
mode:
authorRajesh Veeranki <rveeranki01@gmail.com>2017-05-25 19:19:01 +0700
committerTim Graham <timograham@gmail.com>2017-05-25 08:19:01 -0400
commit67e1afb4a8478af6725e45a9fdcd2a511b2eb005 (patch)
tree3a306f9d8643e66b878a9a1187a5824af94c9daa /tests/httpwrappers
parentf8bce94997739e4e61919cddff84fc3e3302d8f7 (diff)
downloaddjango-67e1afb4a8478af6725e45a9fdcd2a511b2eb005.tar.gz
Fixed #28224 -- Tested for SuspiciousOperation subclasses in Django's tests.
Diffstat (limited to 'tests/httpwrappers')
-rw-r--r--tests/httpwrappers/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py
index 48a30a1b74..88c32f3b0c 100644
--- a/tests/httpwrappers/tests.py
+++ b/tests/httpwrappers/tests.py
@@ -5,7 +5,7 @@ import pickle
import unittest
import uuid
-from django.core.exceptions import DisallowedRedirect, SuspiciousOperation
+from django.core.exceptions import DisallowedRedirect
from django.core.serializers.json import DjangoJSONEncoder
from django.core.signals import request_finished
from django.db import close_old_connections
@@ -441,9 +441,9 @@ class HttpResponseTests(unittest.TestCase):
'file:///etc/passwd',
]
for url in bad_urls:
- with self.assertRaises(SuspiciousOperation):
+ with self.assertRaises(DisallowedRedirect):
HttpResponseRedirect(url)
- with self.assertRaises(SuspiciousOperation):
+ with self.assertRaises(DisallowedRedirect):
HttpResponsePermanentRedirect(url)