jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1044631?usp=email )
Change subject: [tests] Update TestProtectionBot.test_summary() test in
test_protect
......................................................................
[tests] Update TestProtectionBot.test_summary() test in test_protect
The order may change in comment.
Bug: T367259
Change-Id: I20d8d3e9df6f4729cc4437f25cfd92fa0e708b66
---
M tests/protectbot_tests.py
1 file changed, 8 insertions(+), 5 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/tests/protectbot_tests.py b/tests/protectbot_tests.py
index aa3d5f9..30e46f6 100755
--- a/tests/protectbot_tests.py
+++ b/tests/protectbot_tests.py
@@ -53,12 +53,15 @@
'Unprotecting all pages from category Pywikibot Protect Test')
self.maxDiff = None
- self.assertEqual(
- rev[0].comment,
+ comment = rev[0].comment
+ self.assertTrue(comment.startswith(
'Protected "[[User:Sn1per/ProtectTest2]]": Bot: '
- 'Protecting all pages from category Pywikibot Protect Test ('
- '[Move=Allow only administrators] (indefinite) '
- '[Edit=Allow only administrators] (indefinite))')
+ 'Protecting all pages from category Pywikibot Protect Test'
+ ))
+ # the order may change, see T367259
+ for ptype in ('Edit', 'Move'):
+ self.assertIn(f'[{ptype}=Allow only administrators] (indefinite)',
+ comment)
if __name__ == '__main__':
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1044631?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I20d8d3e9df6f4729cc4437f25cfd92fa0e708b66
Gerrit-Change-Number: 1044631
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]