MCPcopy
hub / github.com/django/django / test_functions

Method test_functions

tests/expressions/tests.py:2710–2716  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2708 )
2709
2710 def test_functions(self):
2711 self.assertEqual(repr(Coalesce("a", "b")), "Coalesce(F(a), F(b))")
2712 self.assertEqual(repr(Concat("a", "b")), "Concat(ConcatPair(F(a), F(b)))")
2713 self.assertEqual(repr(Length("a")), "Length(F(a))")
2714 self.assertEqual(repr(Lower("a")), "Lower(F(a))")
2715 self.assertEqual(repr(Substr("a", 1, 3)), "Substr(F(a), Value(1), Value(3))")
2716 self.assertEqual(repr(Upper("a")), "Upper(F(a))")
2717
2718 def test_aggregates(self):
2719 self.assertEqual(repr(Avg("a")), "Avg(F(a))")

Callers

nothing calls this directly

Calls 6

CoalesceClass · 0.90
ConcatClass · 0.90
LengthClass · 0.90
LowerClass · 0.90
SubstrClass · 0.90
UpperClass · 0.90

Tested by

no test coverage detected