Ticket #15647: 15647-in-bulk-accepts-iterables.patch
File 15647-in-bulk-accepts-iterables.patch, 818 bytes (added by , 14 years ago) |
---|
-
modeltests/lookup/tests.py
115 115 self.assertEqual(Article.objects.in_bulk((self.a3.id,)), {self.a3.id: self.a3}) 116 116 self.assertEqual(Article.objects.in_bulk([1000]), {}) 117 117 self.assertEqual(Article.objects.in_bulk([]), {}) 118 self.assertRaises(AssertionError, Article.objects.in_bulk, 'foo') 118 self.assertEqual(Article.objects.in_bulk(iter([self.a1.id])), {self.a1.id: self.a1}) 119 self.assertEqual(Article.objects.in_bulk(iter([])), {}) 119 120 self.assertRaises(TypeError, Article.objects.in_bulk) 120 121 self.assertRaises(TypeError, Article.objects.in_bulk, headline__startswith='Blah') 121 122