diff --git a/tests/test_smw_api.py b/tests/test_smw_api.py index 01fbcf5..b084546 100644 --- a/tests/test_smw_api.py +++ b/tests/test_smw_api.py @@ -59,12 +59,16 @@ def testGetConcept(self): def getSMWs(self, wikiId="smwcopy",debug:bool=False): """get the alternative SMW access instances for the given wiki id""" wikiuser = self.getSMW_WikiUser(wikiId) - wikibot = WikiBot.ofWikiUser(wikiuser,debug=debug) + if not self.inPublicCI(): + wikibot = WikiBot.ofWikiUser(wikiuser,debug=debug) + smwbot = SMWBot(wikibot.site) wikiclient = WikiClient.ofWikiUser(wikiuser,debug=debug) - smwbot = SMWBot(wikibot.site) # https://github.com/wikimedia/pywikibot/blob/master/pywikibot/config.py#L719 smwclient = SMWClient(wikiclient.getSite()) - return [smwbot, smwclient] + if self.inPublicCI(): + return [smwclient] + else: + return [smwbot, smwclient] def testGetEvents(self): """text for issue #6 https://github.com/WolfgangFahl/py-3rdparty-mediawiki/issues/6""" diff --git a/wikibot3rd/wikibot.py b/wikibot3rd/wikibot.py index da7c876..bb60ebc 100644 --- a/wikibot3rd/wikibot.py +++ b/wikibot3rd/wikibot.py @@ -77,8 +77,9 @@ def __init__( o = urlparse(self.url) self.scheme = o.scheme self.netloc = o.netloc + msg=f"netloc for family {self.family} is {self.netloc} derived from url {self.url}" if self.debug: - print(f"netloc for family {self.family} is {self.netloc}") + print(msg) self.scriptPath = o.path + self.scriptPath self.checkFamily() if withLogin: