Esempio n. 1
0
    def test_clearCache(self):
        post = self.createPost()
        post.published = True

        controller_admin.clearCache(self.blog)

        keys = controller_admin.getCacheKeys(self.blog)
        assert not memcache.get_multi(keys)
Esempio n. 2
0
    def test_clearCache(self):
        post = self.createPost()
        post.published = True

        controller_admin.clearCache(self.blog)

        keys = controller_admin.getCacheKeys(self.blog)
        assert not memcache.get_multi(keys)
Esempio n. 3
0
    def test_getCacheKeys(self):
        post = self.createPost()
        post.published = True

        keys = controller_admin.getCacheKeys(self.blog)
        assert keys == [
            '/blog', '/blog/contact', '/blog/feed', '/blog/post/test-post',
            '/blog/author/test-author'
        ]
Esempio n. 4
0
    def test_getCacheKeys(self):
        post = self.createPost()
        post.published = True

        keys = controller_admin.getCacheKeys(self.blog)
        assert keys == ['/blog', '/blog/contact', '/blog/feed', '/blog/post/test-post', '/blog/author/test-author']