summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/test_bulk_update.py
diff options
context:
space:
mode:
authorChris Wesseling <chris@maykinmedia.nl>2025-11-20 15:01:14 +0100
committerJacob Walls <jacobtylerwalls@gmail.com>2025-11-20 17:22:46 -0500
commit5834643f43a767fe19f2c6d10217b204e7584ec8 (patch)
treeadbc0a865f9338296e984ba7a92ba868c4039458 /tests/postgres_tests/test_bulk_update.py
parentff843bcbce1f7fc16fcc4d4810c221a2eb11c167 (diff)
Fixed #36748 -- Filtered non-standard placeholders from UNNEST queries.
Diffstat (limited to 'tests/postgres_tests/test_bulk_update.py')
-rw-r--r--tests/postgres_tests/test_bulk_update.py8
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]
+ )