jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/322253?usp=email )
Change subject: WikibasePage.exists: Add tests for PropertyPage.exists.
......................................................................
WikibasePage.exists: Add tests for PropertyPage.exists.
Currently the tests fails with:
PropertyPage.get does not support any args or kwargs except `force`.
Bug: T145971
Change-Id: I8b2f77439789be8f3390f8510f8402147ca6b094
---
M tests/wikibase_tests.py
1 file changed, 9 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index 033be36..f3aa96e 100755
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -1741,6 +1741,15 @@
self.assertEqual(claim.type, 'wikibase-property')
self.assertEqual(claim.target, property_page)
+ @unittest.expectedFailure
+ def test_exists(self):
+ """Test the exists method of PropertyPage."""
+ wikidata = self.get_repo()
+ property_page = PropertyPage(wikidata, 'P1687')
+ self.assertTrue(property_page.exists())
+ # Retry with cached _content.
+ self.assertTrue(property_page.exists())
+
class TestClaim(WikidataTestCase):
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/322253?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I8b2f77439789be8f3390f8510f8402147ca6b094
Gerrit-Change-Number: 322253
Gerrit-PatchSet: 3
Gerrit-Owner: Dalba <[email protected]>
Gerrit-Reviewer: Dalba <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Magul <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]