Example #1
0
 def testWikiBackup(self):
     # don't test this in Travis
     if getpass.getuser() == "travis":
         return
     wp = WikiPush("smw")
     pageTitles = wp.query("[[Capital of::+]]")
     wp.backup(pageTitles)
 def testIssue66(self):
     '''
     test wikibackup behavior if it has nothing to backup
     https://github.com/WolfgangFahl/py-3rdparty-mediawiki/issues/66
     '''
     if self.inPublicCI(): return
     try:
         wp = WikiPush("smwcopy")
         pageTitles = wp.query("[[Modification date::>=3000-01-01]]", queryDivision=10)
         wp.backup(pageTitles)
     except  Exception as e:
         self.fail(f"Empty query result should not lead to an error but {e} was thrown")
 def testWikiBackup(self):
     # don't test this in Travis
     if self.inPublicCI(): return
     wp=WikiPush("smw")
     pageTitles=wp.query("[[Capital of::+]]")
     wp.backup(pageTitles)