jenkins-bot has submitted this change and it was merged.

Change subject: Wikibase API now reports the Qid for missing items
......................................................................


Wikibase API now reports the Qid for missing items

Whereas wikibase has reported -1 for deleted items, it is now reporting
the id of the item. e.g. Q404 is a deleted item, which wbgetentities now
returns a successful result of
        {"id": "Q404", "missing": ""}
A test was expecting -1, and now needs to expect Q404.

Change-Id: I713476bfbac61e1e7561cac94e1fec21a44d4db1
---
M tests/wikibase_tests.py
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  XZise: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index a9142dd..0f1cba9 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -254,9 +254,8 @@
         self.assertEquals(hasattr(item, '_content'), False)
         self.assertRaises(pywikibot.NoPage, item.get)
         self.assertEquals(hasattr(item, '_content'), True)
-        # the title has now changed
-        self.assertEquals(item._link._title, '-1')
-        self.assertEquals(item.title(), '-1')
+        self.assertEquals(item._link._title, 'Q404')
+        self.assertEquals(item.title(), 'Q404')
         self.assertEquals(item.exists(), False)
 
     def test_fromPage_noprops(self):

-- 
To view, visit https://gerrit.wikimedia.org/r/155123
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I713476bfbac61e1e7561cac94e1fec21a44d4db1
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: XZise <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to