jenkins-bot has submitted this change and it was merged.
Change subject: Fix wikibase test test_own_client ......................................................................
Fix wikibase test test_own_client
The test test_own_client was introduced when Wikidata became its own client. The test checked whether pywikibot could support this configuration, but it used an invalid test scenario to do this. It was introduced in dce03581d4a2f0e52aa5b7a2e2b1e68a5a1b48a1
The Main Page should not be a valid ItemPage title; that is being fixed in other changes. The intention was to see whether an item could be loaded for the normal page object for Main Page.
Change-Id: I21686a13825f547cf1a4ea34dae697139f3e0bbe --- M tests/wikibase_tests.py 1 file changed, 6 insertions(+), 6 deletions(-)
Approvals: John Vandenberg: Looks good to me, but someone else must approve Ladsgroup: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py index d629e7e..9e1bca9 100644 --- a/tests/wikibase_tests.py +++ b/tests/wikibase_tests.py @@ -134,16 +134,16 @@ # working correctly on Wikidata.
# The main Wikidata is its own client. - self.wdp = pywikibot.ItemPage(wikidata, - wikidata.siteinfo['mainpage']) + self.wdp = pywikibot.Page(wikidata, + wikidata.siteinfo['mainpage']) item = pywikibot.ItemPage.fromPage(self.wdp) - del item + self.assertEqual(item.site, self.wdp.site)
# test.wikidata is also - self.wdp = pywikibot.ItemPage(wikidatatest, - wikidatatest.siteinfo['mainpage']) + self.wdp = pywikibot.Page(wikidatatest, + wikidatatest.siteinfo['mainpage']) item = pywikibot.ItemPage.fromPage(self.wdp) - del item + self.assertEqual(item.site, self.wdp.site)
class TestItemLoad(PywikibotTestCase):
pywikibot-commits@lists.wikimedia.org