MCPcopy
hub / github.com/django/django / test_force_str_lazy

Method test_force_str_lazy

tests/utils_tests/test_encoding.py:42–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 force_str(MyString())
41
42 def test_force_str_lazy(self):
43 s = SimpleLazyObject(lambda: "x")
44 self.assertIs(type(force_str(s)), str)
45
46 def test_force_str_DjangoUnicodeDecodeError(self):
47 reason = "unexpected end of data" if PYPY else "invalid start byte"

Callers

nothing calls this directly

Calls 2

SimpleLazyObjectClass · 0.90
force_strFunction · 0.90

Tested by

no test coverage detected