MCPcopy
hub / github.com/django/django / test_decr

Method test_decr

tests/cache/tests.py:183–191  ·  view source on GitHub ↗

Dummy cache values can't be decremented

(self)

Source from the content-addressed store, hash-verified

181 cache.incr("does_not_exist", -1)
182
183 def test_decr(self):
184 "Dummy cache values can't be decremented"
185 cache.set("answer", 42)
186 with self.assertRaises(ValueError):
187 cache.decr("answer")
188 with self.assertRaises(ValueError):
189 cache.decr("does_not_exist")
190 with self.assertRaises(ValueError):
191 cache.decr("does_not_exist", -1)
192
193 def test_touch(self):
194 """Dummy cache can't do touch()."""

Callers

nothing calls this directly

Calls 2

decrMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected