MCPcopy
hub / github.com/django/django / test_func_transform_bilateral

Method test_func_transform_bilateral

tests/db_functions/tests.py:39–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

37 )
38
39 def test_func_transform_bilateral(self):
40 with register_lookup(CharField, UpperBilateral):
41 Author.objects.create(name="John Smith", alias="smithj")
42 Author.objects.create(name="Rhonda")
43 authors = Author.objects.filter(name__upper__exact="john smith")
44 self.assertQuerySetEqual(
45 authors.order_by("name"),
46 [
47 "John Smith",
48 ],
49 lambda a: a.name,
50 )
51
52 def test_func_transform_bilateral_multivalue(self):
53 with register_lookup(CharField, UpperBilateral):

Callers

nothing calls this directly

Calls 5

register_lookupFunction · 0.90
assertQuerySetEqualMethod · 0.80
order_byMethod · 0.80
createMethod · 0.45
filterMethod · 0.45

Tested by

no test coverage detected