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:23:30 -0500
commit161e54348577ee9756b3766ab363596ab880560f (patch)
tree77cfd6348cb4d3e8f4bcc0538105739f7b9a94ac /tests/postgres_tests/test_bulk_update.py
parentb72ee77f6b98649c23e3b52746cd64f08c5d7137 (diff)
[6.0.x] Fixed #36748 -- Filtered non-standard placeholders from UNNEST queries.
Backport of 5834643f43a767fe19f2c6d10217b204e7584ec8 from main.
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]
+ )