summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2025-06-10 08:40:47 +0200
committerGitHub <noreply@github.com>2025-06-10 08:40:47 +0200
commitf5441e42da691ee2e7aeeb9be70f98e2bce6d17d (patch)
tree10e44000439443d1f796bea637ebec3c5c6d84e0
parenta68e8565cdd4fc3f8b738fc516095dab142b9d65 (diff)
Refs #36419 -- Fixed BulkUpdateTests.test_json_field_sql_null() crash on Oracle.
Follow up to c1fa3fdd040718356e5a3b9a0fe699d73f47a940.
-rw-r--r--tests/queries/test_bulk_update.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/queries/test_bulk_update.py b/tests/queries/test_bulk_update.py
index 480fac6784..a9025bddcc 100644
--- a/tests/queries/test_bulk_update.py
+++ b/tests/queries/test_bulk_update.py
@@ -3,7 +3,7 @@ from math import ceil
from django.core.exceptions import FieldDoesNotExist
from django.db import connection
-from django.db.models import F
+from django.db.models import F, IntegerField, Value
from django.db.models.functions import Coalesce, Lower
from django.db.utils import IntegrityError
from django.test import TestCase, override_settings, skipUnlessDBFeature
@@ -305,7 +305,11 @@ class BulkUpdateTests(TestCase):
obj = JSONFieldNullable.objects.create(json_field={})
test_cases = [
("direct_none_assignment", None),
- ("expression_none_assignment", Coalesce(None, None)),
+ ("value_none_assignment", Value(None)),
+ (
+ "expression_none_assignment",
+ Coalesce(None, None, output_field=IntegerField()),
+ ),
]
for label, value in test_cases:
with self.subTest(case=label):