Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Advanced deprecations in django.test.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 87508fbbf37644cb5c03cec6cf63b86995f5ced5 1 parent 4d94c0c
@freakboy3742 freakboy3742 authored
Showing with 2 additions and 11 deletions.
  1. +1 −1  django/test/client.py
  2. +1 −10 django/test/simple.py
View
2  django/test/client.py
@@ -421,7 +421,7 @@ def request(self, **request):
# 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:
View
11 django/test/simple.py
@@ -19,7 +19,7 @@ def __init__(self, *args, **kwargs):
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 @@ def run_tests(self, test_labels, extra_tests=None, **kwargs):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.