mirror of
https://github.com/django/django.git
synced 2025-07-07 03:09:22 +00:00
[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
This commit is contained in:
parent
c3e94faa23
commit
c4767e642a
@ -29,10 +29,12 @@ class GetUniqueCheckTests(unittest.TestCase):
|
|||||||
|
|
||||||
class PerformUniqueChecksTest(unittest.TestCase):
|
class PerformUniqueChecksTest(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
# set debug to True to gain access to connection.queries
|
||||||
self._old_debug, settings.DEBUG = settings.DEBUG, True
|
self._old_debug, settings.DEBUG = settings.DEBUG, True
|
||||||
super(PerformUniqueChecksTest, self).setUp()
|
super(PerformUniqueChecksTest, self).setUp()
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
|
# restore old debug value
|
||||||
settings.DEBUG = self._old_debug
|
settings.DEBUG = self._old_debug
|
||||||
super(PerformUniqueChecksTest, self).tearDown()
|
super(PerformUniqueChecksTest, self).tearDown()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user