MCPcopy
hub / github.com/django/django / check

Method check

tests/get_earliest_or_latest/tests.py:232–240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

230 """
231
232 def check():
233 # We know that we've broken the __iter__ method, so the queryset
234 # should always raise an exception.
235 with self.assertRaises(IndexError):
236 IndexErrorArticle.objects.all()[:10:2]
237 with self.assertRaises(IndexError):
238 IndexErrorArticle.objects.first()
239 with self.assertRaises(IndexError):
240 IndexErrorArticle.objects.last()
241
242 check()
243

Callers

nothing calls this directly

Calls 3

firstMethod · 0.80
lastMethod · 0.80
allMethod · 0.45

Tested by

no test coverage detected