jenkins-bot has submitted this change and it was merged.
Change subject: Improve sysop checking in test_protected ......................................................................
Improve sysop checking in test_protected
Change-Id: I8af1ade2eb7372e096b6117272857dc0d105ddcc --- M tests/edit_failure_tests.py 1 file changed, 1 insertion(+), 1 deletion(-)
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/edit_failure_tests.py b/tests/edit_failure_tests.py index c54aca4..ba85bc5 100644 --- a/tests/edit_failure_tests.py +++ b/tests/edit_failure_tests.py @@ -39,7 +39,7 @@
def test_protected(self): """Test that protected titles raise the appropriate exception.""" - if self.site._username[1]: + if self.site.has_group('sysop'): raise unittest.SkipTest('Testing failure of edit protected with a sysop account') page = pywikibot.Page(self.site, 'Wikipedia:Create a new page') self.assertRaises(LockedPage, page.save)
pywikibot-commits@lists.wikimedia.org