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):