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:
@@ -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':"):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user