def test_cache(self): client = mock.Mock() store = MemcacheBackingStore(60, client) store.cache("get_templates", "content") client.set.assert_called_with("get_templates", "content")
def test_cache_pylibmc_exc_handling(self): client = mock.Mock() client.set.side_effect = Exception("msg") store = MemcacheBackingStore(60, client) store.cache("get_templates", "content")