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)
--
To view, visit https://gerrit.wikimedia.org/r/212776
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8af1ade2eb7372e096b6117272857dc0d105ddcc
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: VcamX <vcamx3(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>