MCPcopy
hub / github.com/django/django / test_null_literal

Method test_null_literal

tests/db_functions/comparison/test_nullif.py:47–54  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

45
46 @skipUnless(connection.vendor == "oracle", "Oracle specific test for NULL-literal")
47 def test_null_literal(self):
48 msg = "Oracle does not allow Value(None) for expression1."
49 with self.assertRaisesMessage(ValueError, msg):
50 list(
51 Author.objects.annotate(nullif=NullIf(Value(None), "name")).values_list(
52 "nullif"
53 )
54 )

Callers

nothing calls this directly

Calls 5

NullIfClass · 0.90
ValueClass · 0.90
assertRaisesMessageMethod · 0.80
values_listMethod · 0.80
annotateMethod · 0.80

Tested by

no test coverage detected