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

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/c/o/content-io-1.0.1/tests/test_cache.py   content-io(Download)
 
        cache.set('i18n://sv-se@label/email.txt#1', u'epost')
        nodes = cache.get_many((self.uri, self.uri))
        self.assertDictEqual(nodes, {self.uri: {'uri': 'i18n://sv-se@label/email.txt#1', 'content': u'epost'}})
 
 
        with self.assertCache(hits=2):
            cache.get_many(uris)
 
        cache.delete_many(uris)
 
        with self.assertCache(misses=2):
            cache.get_many(uris)
 
        with self.assertCache(calls=1, hits=2):
            result = cache.get_many(['i18n://sv-se@foo', 'i18n://sv-se@bar'])
            self.assertDictEqual(result, {
                'i18n://sv-se@foo': {'uri': 'i18n://sv-se@foo.txt#1', 'content': u'Foo'},

src/c/o/content-io-HEAD/tests/test_cache.py   content-io(Download)
 
        cache.set('i18n://sv-se@label/email.txt#1', u'epost')
        nodes = cache.get_many((self.uri, self.uri))
        self.assertDictEqual(nodes, {self.uri: {'uri': 'i18n://sv-se@label/email.txt#1', 'content': u'epost'}})
 
 
        with self.assertCache(hits=2):
            cache.get_many(uris)
 
        cache.delete_many(uris)
 
        with self.assertCache(misses=2):
            cache.get_many(uris)
 
        with self.assertCache(calls=1, hits=2):
            result = cache.get_many(['i18n://sv-se@foo', 'i18n://sv-se@bar'])
            self.assertDictEqual(result, {
                'i18n://sv-se@foo': {'uri': 'i18n://sv-se@foo.txt#1', 'content': u'Foo'},