MCPcopy
hub / github.com/django/django / test_default_far_future_timeout

Method test_default_far_future_timeout

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

Source from the content-addressed store, hash-verified

1639 self.assertEqual(cache.get("infinite_foo"), "bar")
1640
1641 def test_default_far_future_timeout(self):
1642 # Regression test for #22845
1643 with self.settings(
1644 CACHES=caches_setting_for_tests(
1645 base=self.base_params,
1646 exclude=memcached_excluded_caches,
1647 # 60*60*24*365, 1 year
1648 TIMEOUT=31536000,
1649 )
1650 ):
1651 cache.set("future_foo", "bar")
1652 self.assertEqual(cache.get("future_foo"), "bar")
1653
1654 def test_memcached_deletes_key_on_failed_set(self):
1655 # By default memcached allows objects up to 1MB. For the cache_db

Callers

nothing calls this directly

Calls 4

caches_setting_for_testsFunction · 0.85
settingsMethod · 0.45
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected