MCPcopy
hub / github.com/django/django / test_has_key

Method test_has_key

tests/cache/tests.py:159–165  ·  view source on GitHub ↗

The has_key method doesn't ever return True for the dummy cache backend

(self)

Source from the content-addressed store, hash-verified

157 self.assertIsNone(cache.get("key2"))
158
159 def test_has_key(self):
160 """
161 The has_key method doesn't ever return True for the dummy cache backend
162 """
163 cache.set("hello1", "goodbye1")
164 self.assertIs(cache.has_key("hello1"), False)
165 self.assertIs(cache.has_key("goodbye1"), False)
166
167 def test_in(self):
168 "The in operator doesn't ever return True for the dummy cache backend"

Callers

nothing calls this directly

Calls 2

setMethod · 0.45
has_keyMethod · 0.45

Tested by

no test coverage detected