Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/c/a/cache-busters-HEAD/cache_buster/tap.py   cache-busters(Download)
import yaml
 
from cache_buster.caches import MemcachedCache, MultiCache
from cache_buster.databases import (
    DatabaseListenerService, MySQLDatabaseListener
        key_maker = FormattingKeyMaker(data["on_update"])
 
    cache_backend = MultiCache([
        MemcachedCache(TCP4ClientEndpoint(reactor, cache, DEFAULT_PORT))
        for cache in config['caches']

src/c/a/cache-busters-HEAD/cache_buster/test/test_caches.py   cache-busters(Download)
from twisted.trial.unittest import TestCase
 
from cache_buster.caches import InMemoryCache, MemcachedCache, MultiCache
 
 
    def test_delete_returns_true_when_any_return_true(self):
        c1 = InMemoryCache({})
        c2 = InMemoryCache({"foo": "bar"})
        cache = MultiCache([c1, c2])
        d = cache.delete("foo")
    def test_delete_returns_false_when_all_return_false(self):
        c1 = InMemoryCache({})
        c2 = InMemoryCache({})
        cache = MultiCache([c1, c2])
        d = cache.delete("foo")
        self.assertFalse(self.successResultOf(d))
 
    def test_delete_errbacks_when_any_errback(self):
        cache = MultiCache([