From fa523b95bbcca5ed7a0644db506989b8c9afb09d Mon Sep 17 00:00:00 2001 From: Bertrand Bordage Date: Sun, 7 Dec 2014 05:21:24 +0100 Subject: [PATCH] Restores a test commented because it was unexpectedly breaking the suite. --- cachalot/tests/settings.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cachalot/tests/settings.py b/cachalot/tests/settings.py index 6b344ae..ac558dd 100644 --- a/cachalot/tests/settings.py +++ b/cachalot/tests/settings.py @@ -23,17 +23,17 @@ class SettingsTestCase(TransactionTestCase): with self.assertNumQueries(1): list(Test.objects.all()) - # def test_django_override(self): - # with self.settings(CACHALOT_ENABLED=False): - # with self.assertNumQueries(1): - # list(Test.objects.all()) - # with self.assertNumQueries(1): - # list(Test.objects.all()) - # with self.settings(CACHALOT_ENABLED=True): - # with self.assertNumQueries(1): - # list(Test.objects.all()) - # with self.assertNumQueries(0): - # list(Test.objects.all()) + def test_django_override(self): + with self.settings(CACHALOT_ENABLED=False): + with self.assertNumQueries(1): + list(Test.objects.all()) + with self.assertNumQueries(1): + list(Test.objects.all()) + with self.settings(CACHALOT_ENABLED=True): + with self.assertNumQueries(1): + list(Test.objects.all()) + with self.assertNumQueries(0): + list(Test.objects.all()) def test_enabled(self): with cachalot_settings(CACHALOT_ENABLED=True):