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

Method test_add

tests/cache/tests.py:344–348  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

342 self.assertIsNone(cache.get("key_default_none", default="default"))
343
344 def test_add(self):
345 # A key can be added to a cache
346 self.assertIs(cache.add("addkey1", "value"), True)
347 self.assertIs(cache.add("addkey1", "newvalue"), False)
348 self.assertEqual(cache.get("addkey1"), "value")
349
350 def test_prefix(self):
351 # Test for same cache key conflicts between shared backend

Callers

nothing calls this directly

Calls 2

addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected