MCPcopy
hub / github.com/django/django / test_unicode

Method test_unicode

tests/cache/tests.py:227–238  ·  view source on GitHub ↗

Unicode values are ignored by the dummy cache

(self)

Source from the content-addressed store, hash-verified

225 self.assertIs(cache.has_key("expire3"), False)
226
227 def test_unicode(self):
228 "Unicode values are ignored by the dummy cache"
229 stuff = {
230 "ascii": "ascii_value",
231 "unicode_ascii": "Iñtërnâtiônàlizætiøn1",
232 "Iñtërnâtiônàlizætiøn": "Iñtërnâtiônàlizætiøn2",
233 "ascii2": {"x": 1},
234 }
235 for key, value in stuff.items():
236 with self.subTest(key=key):
237 cache.set(key, value)
238 self.assertIsNone(cache.get(key))
239
240 def test_set_many(self):
241 "set_many does nothing for the dummy cache backend"

Callers

nothing calls this directly

Calls 3

itemsMethod · 0.45
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected