jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/423255 )
Change subject: [tests] skip ns() and pageid() tests when 'title' key is missing
......................................................................
[tests] skip ns() and pageid() tests when 'title' key is missing
We can assume that 'ns' and 'pageid' key is missing
when the 'title' is hidden
Bug: T191145
Change-Id: Ib9bd2e7f99c614b278c6a8b0cc6367127a73edcf
---
M tests/logentry_tests.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/logentry_tests.py b/tests/logentry_tests.py
index 50f900a..51d6cc3 100644
--- a/tests/logentry_tests.py
+++ b/tests/logentry_tests.py
@@ -80,10 +80,10 @@
except KeyError as e:
self.assertRegex(str(e), "Log entry ([^)]+) has no 'comment'
key")
self.assertIsInstance(logentry.logid(), int)
- self.assertIsInstance(logentry.ns(), int)
- self.assertIsInstance(logentry.pageid(), int)
self.assertIsInstance(logentry.timestamp(), pywikibot.Timestamp)
if 'title' in logentry.data: # title may be missing
+ self.assertIsInstance(logentry.ns(), int)
+ self.assertIsInstance(logentry.pageid(), int)
if logtype == 'block' and logentry.isAutoblockRemoval:
self.assertIsInstance(logentry.page(), int)
elif isinstance(logentry, UserTargetLogEntry):
--
To view, visit
https://gerrit.wikimedia.org/r/423255
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9bd2e7f99c614b278c6a8b0cc6367127a73edcf
Gerrit-Change-Number: 423255
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>