Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Ensure the mutliple_database tests leave the settings in the same sta…

…te they found them.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14313 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 085e4c9112600b84cef601bc331cafae03c1b1c9 1 parent 9d5d757
Alex Gaynor authored October 21, 2010
8  tests/regressiontests/multiple_database/tests.py
@@ -1548,13 +1548,17 @@ def test_dumpdata(self):
1548 1548
         command_output = new_io.getvalue().strip()
1549 1549
         self.assertTrue('"email": "alice@example.com",' in command_output)
1550 1550
 
  1551
+_missing = object()
1551 1552
 class UserProfileTestCase(TestCase):
1552 1553
     def setUp(self):
1553  
-        self.old_auth_profile_module = getattr(settings, 'AUTH_PROFILE_MODULE', None)
  1554
+        self.old_auth_profile_module = getattr(settings, 'AUTH_PROFILE_MODULE', _missing)
1554 1555
         settings.AUTH_PROFILE_MODULE = 'multiple_database.UserProfile'
1555 1556
 
1556 1557
     def tearDown(self):
1557  
-        settings.AUTH_PROFILE_MODULE = self.old_auth_profile_module
  1558
+        if self.old_auth_profile_module is _missing:
  1559
+            del settings.AUTH_PROFILE_MODULE
  1560
+        else:
  1561
+            settings.AUTH_PROFILE_MODULE = self.old_auth_profile_module
1558 1562
 
1559 1563
     def test_user_profiles(self):
1560 1564
 

0 notes on commit 085e4c9

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