예제 #1
0
    def test_cache(self):
        client = mock.Mock()

        store = MemcacheBackingStore(60, client)
        store.cache("get_templates", "content")

        client.set.assert_called_with("get_templates", "content")
예제 #2
0
    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")