Esempio n. 1
0
    def setUp(self):
        self.testbed = testbed.Testbed()
        self.testbed.activate()
        self.testbed.init_datastore_v3_stub()
        self.testbed.init_memcache_stub()
        self.testbed.init_taskqueue_stub()
        cache.prc.flush_all()

        WikiPage.get_by_title(u'The Mind\'s I').update_content(u'.schema Book\n[[author::Daniel Dennett]] and [[author::Douglas Hofstadter]]\n[[datePublished::1982]]', 0, u'')
        WikiPage.get_by_title(u'GEB').update_content(u'.schema Book\n{{author::Douglas Hofstadter}}\n[[datePublished::1979]]', 0, u'')
        WikiPage.get_by_title(u'Douglas Hofstadter').update_content(u'.schema Person', 0, u'')
        for p in WikiPage.query().fetch():
            p.rebuild_data_index()
Esempio n. 2
0
    def setUp(self):
        self.testbed = testbed.Testbed()
        self.testbed.activate()
        self.testbed.init_datastore_v3_stub()
        self.testbed.init_memcache_stub()
        self.testbed.init_taskqueue_stub()
        self.testbed.init_user_stub()
        cache.prc.flush_all()

        WikiPage.get_by_title(u'A').update_content(u'.schema Book\n.read all\nHello', 0, u'')
        WikiPage.get_by_title(u'B').update_content(u'.schema Book\n.read [email protected]\nThere', 0, u'')
        for p in WikiPage.query().fetch():
            p.rebuild_data_index()