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

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

src/c/o/content-io-HEAD/tests/__init__.py   content-io(Download)
 
        env.reset()
        cache.clear()
        storage.backend._call_delete()
        pipeline.clear()

src/c/o/content-io-HEAD/tests/test_api.py   content-io(Download)
        node = cio.set('i18n://sv-se@label/email.md', u'e-post')
        self.assertEqual(node.uri, 'i18n://sv-se@label/email.md#1')
        cache.clear()
        node = cio.get('label/email', u'fallback')
        self.assertEqual(node.content, u'<p>e-post</p>')
 
        # Assert get specific version doesn't mess up the cache
        cache.clear()
        with self.assertCache(calls=0):
            self.assertEqual(cio.get('page/title#2').content, u'<h1>Content-IO - Lightening fast!</h1>')
 
        node1 = cio.get('page/title', u'Title1', lazy=False)
        cache.clear()
        node2 = cio.get('page/title', u'Title2', lazy=False)
        self.assertEqual(unicode(node1), u'Title1')
                    self.assertEqual(node4.content, u'surname')
 
            cache.clear()
 
            with self.assertCache(misses=2, sets=2):
        self.assertDictEqual(cached_node, {'uri': node.uri, 'content': u'<h1>Default Markdown</h1>'})
 
        cache.clear()
        node = cio.get('i18n://sv-se@page/title.md', u'Default Markdown', lazy=False)
        self.assertEqual(node.uri, 'i18n://sv-se@page/title.md')

src/d/j/djedi-cms-1.0/djedi/tests/test_templatetags.py   djedi-cms(Download)
                assert html == u'<h1>Djedi</h1><p>Lightning fast!</p>'
 
        cache.clear()
 
        with self.assertCache(calls=1, misses=2):

src/d/j/djedi-cms-1.0/djedi/tests/base.py   djedi-cms(Download)
 
        env.reset()
        cache.clear()
        pipeline.clear()
        plugins.load()

src/c/o/content-io-1.0.1/tests/__init__.py   content-io(Download)
 
        env.reset()
        cache.clear()
        storage.backend._call_delete()
        pipeline.clear()

src/c/o/content-io-1.0.1/tests/test_api.py   content-io(Download)
        node = cio.set('i18n://sv-se@label/email.md', u'e-post')
        self.assertEqual(node.uri, 'i18n://sv-se@label/email.md#1')
        cache.clear()
        node = cio.get('label/email', u'fallback')
        self.assertEqual(node.content, u'<p>e-post</p>')
 
        # Assert get specific version doesn't mess up the cache
        cache.clear()
        with self.assertCache(calls=0):
            self.assertEqual(cio.get('page/title#2').content, u'<h1>Content-IO - Lightening fast!</h1>')
 
        node1 = cio.get('page/title', u'Title1', lazy=False)
        cache.clear()
        node2 = cio.get('page/title', u'Title2', lazy=False)
        self.assertEqual(unicode(node1), u'Title1')
                    self.assertEqual(node4.content, u'surname')
 
            cache.clear()
 
            with self.assertCache(misses=2, sets=2):
        self.assertDictEqual(cached_node, {'uri': node.uri, 'content': u'<h1>Default Markdown</h1>'})
 
        cache.clear()
        node = cio.get('i18n://sv-se@page/title.md', u'Default Markdown', lazy=False)
        self.assertEqual(node.uri, 'i18n://sv-se@page/title.md')