Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Russell Keith-Magee authored April 02, 2011
2  django/test/client.py
@@ -421,7 +421,7 @@ def request(self, **request):
421 421
             # Provide a backwards-compatible (but pending deprecation) response.template
422 422
             def _get_template(self):
423 423
                 warnings.warn("response.template is deprecated; use response.templates instead (which is always a list)",
424  
-                              PendingDeprecationWarning, stacklevel=2)
  424
+                              DeprecationWarning, stacklevel=2)
425 425
                 if not self.templates:
426 426
                     return None
427 427
                 elif len(self.templates) == 1:
11  django/test/simple.py
@@ -19,7 +19,7 @@ def __init__(self, *args, **kwargs):
19 19
         import warnings
20 20
         warnings.warn(
21 21
             "DjangoTestRunner is deprecated; it's functionality is indistinguishable from TextTestRunner",
22  
-            PendingDeprecationWarning
  22
+            DeprecationWarning
23 23
         )
24 24
         super(DjangoTestRunner, self).__init__(*args, **kwargs)
25 25
 
@@ -355,12 +355,3 @@ def run_tests(self, test_labels, extra_tests=None, **kwargs):
355 355
         self.teardown_databases(old_config)
356 356
         self.teardown_test_environment()
357 357
         return self.suite_result(suite, result)
358  
-
359  
-def run_tests(test_labels, verbosity=1, interactive=True, failfast=False, extra_tests=None):
360  
-    import warnings
361  
-    warnings.warn(
362  
-        'The run_tests() test runner has been deprecated in favor of DjangoTestSuiteRunner.',
363  
-        DeprecationWarning
364  
-    )
365  
-    test_runner = DjangoTestSuiteRunner(verbosity=verbosity, interactive=interactive, failfast=failfast)
366  
-    return test_runner.run_tests(test_labels, extra_tests=extra_tests)

0 notes on commit 87508fb

Please sign in to comment.
Something went wrong with that request. Please try again.