diff options
Diffstat (limited to 'tests/postgres_tests/test_bulk_update.py')
| -rw-r--r-- | tests/postgres_tests/test_bulk_update.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_bulk_update.py b/tests/postgres_tests/test_bulk_update.py index 85dfcedd09..f3e8ac8a40 100644 --- a/tests/postgres_tests/test_bulk_update.py +++ b/tests/postgres_tests/test_bulk_update.py @@ -6,6 +6,7 @@ from .models import ( IntegerArrayModel, NestedIntegerArrayModel, NullableIntegerArrayModel, + OffByOneModel, OtherTypesArrayModel, RangesModel, ) @@ -44,3 +45,10 @@ class BulkSaveTests(PostgreSQLTestCase): self.assertSequenceEqual( Model.objects.filter(**{field: new}), instances ) + + def test_bulk_create(self): + OffByOneModel.objects.bulk_create(OffByOneModel(one_off=0) for _ in range(20)) + + self.assertSequenceEqual( + [m.one_off for m in OffByOneModel.objects.all()], 20 * [1] + ) |
