MCPcopy
hub / github.com/django/django / test_basic

Method test_basic

tests/db_functions/text/test_ord.py:16–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

14 cls.rhonda = Author.objects.create(name="Rhonda")
15
16 def test_basic(self):
17 authors = Author.objects.annotate(name_part=Ord("name"))
18 self.assertCountEqual(
19 authors.filter(name_part__gt=Ord(Value("John"))), [self.elena, self.rhonda]
20 )
21 self.assertCountEqual(
22 authors.exclude(name_part__gt=Ord(Value("John"))), [self.john]
23 )
24
25 def test_transform(self):
26 with register_lookup(CharField, Ord):

Callers

nothing calls this directly

Calls 5

OrdClass · 0.90
ValueClass · 0.90
annotateMethod · 0.80
excludeMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected