From 9e576f4d40bfbcb62d4637b2cc4d71eaf9f4bff9 Mon Sep 17 00:00:00 2001 From: Bertrand Bordage Date: Mon, 29 Sep 2014 10:17:48 +0200 Subject: [PATCH] Adds a comment for get_or_create test. --- cachalot/tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cachalot/tests.py b/cachalot/tests.py index 333bad7..2e04ab4 100644 --- a/cachalot/tests.py +++ b/cachalot/tests.py @@ -498,6 +498,10 @@ class WriteTestCase(TestCase): self.assertListEqual(data3, [t1, t2, t3]) def test_get_or_create(self): + """ + Tests if the ``SELECT`` query of a ``QuerySet.get_or_create`` + is cached, but not the ``INSERT`` one. + """ with self.assertNumQueries(1): data1 = list(Test.objects.all()) self.assertListEqual(data1, [])