()
| 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 |