jenkins-bot has submitted this change and it was merged.
Change subject: Mark site.patrol() as a user write action ......................................................................
Mark site.patrol() as a user write action
Set the patrol test case to be 'write' so that it is disabled by default, and only run on the 'test:test' site.
Not cherry-picked: pywikibot/families/test_family.py tests/aspects.py
Change-Id: I0ab4dc20f82857505236c0c678a602c02c001e37 (manually cherry picked from 09dce8fe3b30) --- M pywikibot/site.py M tests/site_tests.py 2 files changed, 13 insertions(+), 0 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index 312bb39..e85b821 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -4665,6 +4665,8 @@ "notpatrollable": "The revision %(revid)s can't be patrolled as it's too old." }
+ @must_be(group='user') + @deprecated_args(token=None) def patrol(self, rcid=None, revid=None, revision=None): """Return a generator of patrolled pages.
diff --git a/tests/site_tests.py b/tests/site_tests.py index d9bd295..20be28b 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -1372,6 +1372,17 @@ self.assertTrue(user["name"] in ["Jimbo Wales", "Brion VIBBER", "Tim Starling"])
+ +class PatrolTestCase(TestCase): + + """Test patrol method.""" + + family = 'test' + code = 'test' + + user = True + write = True + def testPatrol(self): """Test the site.patrol() method.""" mysite = self.get_site()
pywikibot-commits@lists.wikimedia.org