MCPcopy
hub / github.com/django/django / test_decr_version

Method test_decr_version

tests/cache/tests.py:271–277  ·  view source on GitHub ↗

Dummy cache versions can't be decremented

(self)

Source from the content-addressed store, hash-verified

269 cache.incr_version("does_not_exist")
270
271 def test_decr_version(self):
272 "Dummy cache versions can't be decremented"
273 cache.set("answer", 42)
274 with self.assertRaises(ValueError):
275 cache.decr_version("answer")
276 with self.assertRaises(ValueError):
277 cache.decr_version("does_not_exist")
278
279 def test_get_or_set(self):
280 self.assertEqual(cache.get_or_set("mykey", "default"), "default")

Callers

nothing calls this directly

Calls 2

decr_versionMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected