From 67e1afb4a8478af6725e45a9fdcd2a511b2eb005 Mon Sep 17 00:00:00 2001 From: Rajesh Veeranki Date: Thu, 25 May 2017 19:19:01 +0700 Subject: Fixed #28224 -- Tested for SuspiciousOperation subclasses in Django's tests. --- tests/httpwrappers/tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/httpwrappers') 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) -- cgit v1.3