Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed override_settings usage in test_client_regress

  • Loading branch information...
commit 566ac30eb92574f698a848739fa5008d5e08a2ee 1 parent ade44b8
Claude Paroz authored June 02, 2012
6  tests/regressiontests/test_client_regress/tests.py
@@ -609,7 +609,6 @@ def test_exception_cleared(self):
609 609
             self.fail("Staff should be able to visit this page")
610 610
 
611 611
 
612  
-@override_settings(TEMPLATE_DIRS=())
613 612
 class TemplateExceptionTests(TestCase):
614 613
     def setUp(self):
615 614
         # Reset the loaders so they don't try to render cached templates.
@@ -618,6 +617,7 @@ def setUp(self):
618 617
                 if hasattr(template_loader, 'reset'):
619 618
                     template_loader.reset()
620 619
 
  620
+    @override_settings(TEMPLATE_DIRS=(),)
621 621
     def test_no_404_template(self):
622 622
         "Missing templates are correctly reported by test client"
623 623
         try:
@@ -626,9 +626,11 @@ def test_no_404_template(self):
626 626
         except TemplateDoesNotExist:
627 627
             pass
628 628
 
  629
+    @override_settings(
  630
+        TEMPLATE_DIRS=(os.path.join(os.path.dirname(__file__), 'bad_templates'),)
  631
+    )
629 632
     def test_bad_404_template(self):
630 633
         "Errors found when rendering 404 error templates are re-raised"
631  
-        settings.TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'bad_templates'),)
632 634
         try:
633 635
             response = self.client.get("/no_such_view/")
634 636
             self.fail("Should get error about syntax error in template")

0 notes on commit 566ac30

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