Skip to content

Commit

Permalink
Merge "[tests] Update TestProtectionBot.test_summary() test in test_p…
Browse files Browse the repository at this point in the history
…rotect"
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Jun 15, 2024
2 parents 77b8903 + 11f9e7c commit b765150
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/protectbot_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@ def test_summary(self):
'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__':
Expand Down

0 comments on commit b765150

Please sign in to comment.