MCPcopy
hub / github.com/django/django / test_iterator

Method test_iterator

tests/raw_query/tests.py:434–438  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

432 list(books)
433
434 def test_iterator(self):
435 with self.assertNumQueries(2):
436 books = Book.objects.raw("SELECT * FROM raw_query_book")
437 list(books.iterator())
438 list(books.iterator())
439
440 def test_bool(self):
441 self.assertIs(bool(Book.objects.raw("SELECT * FROM raw_query_book")), True)

Callers

nothing calls this directly

Calls 3

assertNumQueriesMethod · 0.80
rawMethod · 0.45
iteratorMethod · 0.45

Tested by

no test coverage detected