From c4767e642a4b64cc9f1bc53177b21dbd0adb01f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Tue, 29 Dec 2009 04:05:17 +0000 Subject: [PATCH] [soc2009/model-validation] Added some comments to explain why I set DEBUG in tests git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12019 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/validation/test_unique.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/modeltests/validation/test_unique.py b/tests/modeltests/validation/test_unique.py index 2790d378c6..944697100f 100644 --- a/tests/modeltests/validation/test_unique.py +++ b/tests/modeltests/validation/test_unique.py @@ -29,10 +29,12 @@ class GetUniqueCheckTests(unittest.TestCase): class PerformUniqueChecksTest(unittest.TestCase): def setUp(self): + # set debug to True to gain access to connection.queries self._old_debug, settings.DEBUG = settings.DEBUG, True super(PerformUniqueChecksTest, self).setUp() def tearDown(self): + # restore old debug value settings.DEBUG = self._old_debug super(PerformUniqueChecksTest, self).tearDown()