diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-04-02 08:41:26 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-04-02 08:41:26 +0000 |
| commit | 87508fbbf37644cb5c03cec6cf63b86995f5ced5 (patch) | |
| tree | f7bb150715684d4f509ddbe38fe139f409baface | |
| parent | 4d94c0cb38624115299e19daae24d2312e60e273 (diff) | |
Advanced deprecations in django.test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/test/client.py | 2 | ||||
| -rw-r--r-- | django/test/simple.py | 11 |
2 files changed, 2 insertions, 11 deletions
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) |
