MCPcopy
hub / github.com/django/django / test_non_ascii

Method test_non_ascii

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

Source from the content-addressed store, hash-verified

21 )
22
23 def test_non_ascii(self):
24 authors = Author.objects.annotate(first_initial=Left("name", 1))
25 self.assertCountEqual(authors.filter(first_initial=Chr(ord("É"))), [self.elena])
26 self.assertCountEqual(
27 authors.exclude(first_initial=Chr(ord("É"))), [self.john, self.rhonda]
28 )
29
30 def test_transform(self):
31 with register_lookup(IntegerField, Chr):

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