diff --git a/django/test/client.py b/django/test/client.py index 15147c51fa..5cbc0ca257 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -421,7 +421,7 @@ class Client(RequestFactory): # Provide a backwards-compatible (but pending deprecation) response.template def _get_template(self): warnings.warn("response.template is deprecated; use response.templates instead (which is always a list)", - PendingDeprecationWarning, stacklevel=2) + DeprecationWarning, stacklevel=2) if not self.templates: return None elif len(self.templates) == 1: diff --git a/django/test/simple.py b/django/test/simple.py index 41b2a421ed..b8b422335d 100644 --- a/django/test/simple.py +++ b/django/test/simple.py @@ -19,7 +19,7 @@ class DjangoTestRunner(unittest.TextTestRunner): import warnings warnings.warn( "DjangoTestRunner is deprecated; it's functionality is indistinguishable from TextTestRunner", - PendingDeprecationWarning + DeprecationWarning ) super(DjangoTestRunner, self).__init__(*args, **kwargs) @@ -355,12 +355,3 @@ class DjangoTestSuiteRunner(object): self.teardown_databases(old_config) self.teardown_test_environment() return self.suite_result(suite, result) - -def run_tests(test_labels, verbosity=1, interactive=True, failfast=False, extra_tests=None): - import warnings - warnings.warn( - 'The run_tests() test runner has been deprecated in favor of DjangoTestSuiteRunner.', - DeprecationWarning - ) - test_runner = DjangoTestSuiteRunner(verbosity=verbosity, interactive=interactive, failfast=failfast) - return test_runner.run_tests(test_labels, extra_tests=extra_tests)