(self)
| 53 | ) |
| 54 | |
| 55 | def test_multiple_fields(self): |
| 56 | for note in self.notes: |
| 57 | note.note = "test-%s" % note.id |
| 58 | note.misc = "misc-%s" % note.id |
| 59 | with self.assertNumQueries(1): |
| 60 | Note.objects.bulk_update(self.notes, ["note", "misc"]) |
| 61 | self.assertCountEqual( |
| 62 | Note.objects.values_list("note", flat=True), |
| 63 | [cat.note for cat in self.notes], |
| 64 | ) |
| 65 | self.assertCountEqual( |
| 66 | Note.objects.values_list("misc", flat=True), |
| 67 | [cat.misc for cat in self.notes], |
| 68 | ) |
| 69 | |
| 70 | def test_batch_size(self): |
| 71 | with self.assertNumQueries(len(self.notes)): |
nothing calls this directly
no test coverage detected