Fixes tests on Django 1.7.

This commit is contained in:
Bertrand Bordage 2015-10-05 20:20:43 +02:00
parent a8b77c6e32
commit 6b385919f1

View file

@ -145,9 +145,9 @@ class SettingsTestCase(TransactionTestCase):
# However, if we only fetch data from the 'cachalot_testchild'
# table, its cachable.
with self.assertNumQueries(1):
list(TestChild.objects.only('public'))
list(TestChild.objects.values('public'))
with self.assertNumQueries(0):
list(TestChild.objects.only('public'))
list(TestChild.objects.values('public'))
def test_uncachable_tables(self):
with self.settings(CACHALOT_UNCACHABLE_TABLES=('cachalot_test',)):