Browse Source

Always roll back changes made to conf by tests

Rafał Pitoń 11 years ago
parent
commit
10143d3e20
1 changed files with 3 additions and 2 deletions
  1. 3 2
      misago/users/tests/test_registration_views.py

+ 3 - 2
misago/users/tests/test_registration_views.py

@@ -6,6 +6,9 @@ from misago.conf import settings
 
 
 class RegisterDecoratorTests(TestCase):
+    def tearDown(self):
+        settings.reset_settings()
+
     def test_register_decorator_calls_valid_view_200(self):
         """register decorator calls valid view"""
         settings.override_setting('account_activation', 'disabled')
@@ -21,8 +24,6 @@ class RegisterDecoratorTests(TestCase):
         self.assertIn('Register new account',
                       response.content)
 
-        settings.reset_settings()
-
 
 class RegisterViewTests(TestCase):
     def test_register_view_get_returns_200(self):