MCPcopy
hub / github.com/django/django / test_propagates_null

Method test_propagates_null

tests/db_functions/comparison/test_least.py:34–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32
33 @skipIfDBFeature("greatest_least_ignores_nulls")
34 def test_propagates_null(self):
35 Article.objects.create(title="Testing with Django", written=timezone.now())
36 articles = Article.objects.annotate(first_updated=Least("written", "published"))
37 self.assertIsNone(articles.first().first_updated)
38
39 def test_coalesce_workaround(self):
40 future = datetime(2100, 1, 1)

Callers

nothing calls this directly

Calls 5

LeastClass · 0.90
annotateMethod · 0.80
firstMethod · 0.80
createMethod · 0.45
nowMethod · 0.45

Tested by

no test coverage detected