summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/test_array.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/postgres_tests/test_array.py')
-rw-r--r--tests/postgres_tests/test_array.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py
index d930a01a1d..9ad4ec16e9 100644
--- a/tests/postgres_tests/test_array.py
+++ b/tests/postgres_tests/test_array.py
@@ -28,6 +28,7 @@ from .models import (
OtherTypesArrayModel,
PostgreSQLModel,
Tag,
+ WithSizeArrayModel,
)
try:
@@ -216,6 +217,16 @@ class TestQuerying(PostgreSQLTestCase):
]
)
+ def test_bulk_create_with_sized_arrayfield(self):
+ objs = WithSizeArrayModel.objects.bulk_create(
+ [
+ WithSizeArrayModel(field=[1, 2]),
+ WithSizeArrayModel(field=[3, 4]),
+ ]
+ )
+ self.assertEqual(objs[0].field, [1, 2])
+ self.assertEqual(objs[1].field, [3, 4])
+
def test_empty_list(self):
NullableIntegerArrayModel.objects.create(field=[])
obj = (