MCPcopy
hub / github.com/django/django / test_textfield_exact_null

Method test_textfield_exact_null

tests/lookup/tests.py:1413–1418  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1411 self.assertQuerySetEqual(Season.objects.filter(gt__regex=r"^$"), [])
1412
1413 def test_textfield_exact_null(self):
1414 with self.assertNumQueries(1) as ctx:
1415 self.assertSequenceEqual(Author.objects.filter(bio=None), [self.au2])
1416 # Columns with IS NULL condition are not wrapped (except PostgreSQL).
1417 bio_column = connection.ops.quote_name(Author._meta.get_field("bio").column)
1418 self.assertIn(f"{bio_column} IS NULL", ctx.captured_queries[0]["sql"])
1419
1420 def test_regex_non_string(self):
1421 """

Callers

nothing calls this directly

Calls 4

assertNumQueriesMethod · 0.80
filterMethod · 0.45
quote_nameMethod · 0.45
get_fieldMethod · 0.45

Tested by

no test coverage detected