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

[py3k] Silence many warnings while running the tests.

This commit is contained in:
Alex Gaynor
2012-09-07 13:17:09 -04:00
parent 4321ee25c5
commit 292322f977
29 changed files with 213 additions and 196 deletions

View File

@@ -6,8 +6,7 @@ from django.core.wsgi import get_wsgi_application
from django.test import TestCase
from django.test.client import RequestFactory
from django.test.utils import override_settings
from django.utils import six
from django.utils import unittest
from django.utils import six, unittest
class WSGITest(TestCase):
@@ -84,7 +83,7 @@ class GetInternalWSGIApplicationTest(unittest.TestCase):
@override_settings(WSGI_APPLICATION="regressiontests.wsgi.noexist.app")
def test_bad_module(self):
with self.assertRaisesRegexp(
with six.assertRaisesRegex(self,
ImproperlyConfigured,
r"^WSGI application 'regressiontests.wsgi.noexist.app' could not be loaded; could not import module 'regressiontests.wsgi.noexist':"):
@@ -93,7 +92,7 @@ class GetInternalWSGIApplicationTest(unittest.TestCase):
@override_settings(WSGI_APPLICATION="regressiontests.wsgi.wsgi.noexist")
def test_bad_name(self):
with self.assertRaisesRegexp(
with six.assertRaisesRegex(self,
ImproperlyConfigured,
r"^WSGI application 'regressiontests.wsgi.wsgi.noexist' could not be loaded; can't find 'noexist' in module 'regressiontests.wsgi.wsgi':"):