def test_versionPages(self): doc = Documentation(self.host, self.path) doc.login(self.user, self.password) sourceVersion = '0.1' for pagename in ['Page1', 'Page2', 'Page3']: doc.createPage(sourceVersion, pagename, 'This is page %s' % pagename, self.prefix) targetVersion = '0.2' result = doc.versionPages(sourceVersion, targetVersion, [self.prefix]) self.assertFalse(False in result)
def test_versionPagesAsTemplate(self): doc = Documentation(self.host, self.path) doc.login(self.user, self.password) templatePrefix = 'Template:' + self.prefix sourceVersion = '0.1' for pagename in ['template1', 'template2']: doc.createPage(sourceVersion, pagename, 'This is page %s' % pagename, templatePrefix) targetVersion = '0.2' result = doc.versionPages(sourceVersion, targetVersion, [templatePrefix]) self.assertFalse(False in result)