mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #14700 -- ensure that a raw query is only executed once per iteration.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -217,3 +217,8 @@ class RawQueryTests(TestCase):
|
||||
self.assertEqual(
|
||||
[o.pk for o in FriendlyAuthor.objects.raw(query)], [f.pk]
|
||||
)
|
||||
|
||||
def test_query_count(self):
|
||||
self.assertNumQueries(1,
|
||||
list, Author.objects.raw("SELECT * FROM raw_query_author")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user