MCPcopy
hub / github.com/django/django / test_add

Method test_add

tests/cache/tests.py:129–133  ·  view source on GitHub ↗

Add doesn't do anything in dummy cache backend

(self)

Source from the content-addressed store, hash-verified

127 self.assertIsNone(cache.get("key"))
128
129 def test_add(self):
130 "Add doesn't do anything in dummy cache backend"
131 self.assertIs(cache.add("addkey1", "value"), True)
132 self.assertIs(cache.add("addkey1", "newvalue"), True)
133 self.assertIsNone(cache.get("addkey1"))
134
135 def test_non_existent(self):
136 "Nonexistent keys aren't found in the dummy cache backend"

Callers

nothing calls this directly

Calls 2

addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected