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

Method test_basic

tests/db_functions/text/test_chr.py:16–21  ·  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(first_initial=Left("name", 1))
18 self.assertCountEqual(authors.filter(first_initial=Chr(ord("J"))), [self.john])
19 self.assertCountEqual(
20 authors.exclude(first_initial=Chr(ord("J"))), [self.elena, self.rhonda]
21 )
22
23 def test_non_ascii(self):
24 authors = Author.objects.annotate(first_initial=Left("name", 1))

Callers

nothing calls this directly

Calls 5

LeftClass · 0.90
ChrClass · 0.90
annotateMethod · 0.80
excludeMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected