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):
pywikibot-commits@lists.wikimedia.org