https://travis-ci.org/wikimedia/pywikibot/jobs/640945614#L3812
====================================================================== ERROR: test_deletedrevs (tests.site_tests.SiteSysopTestCase) Test the site.deletedrevs() method. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/wikimedia/pywikibot/tests/site_tests.py", line 1925, in test_deletedrevs for dr in gen: File "/home/travis/build/wikimedia/pywikibot/pywikibot/site.py", line 5039, in deletedrevs raise Error(err + 'access deleted revisions.') Error: deletedrevs: User:Pywikibot-test not authorized to access deleted revisions.
______________________ SiteSysopTestCase.test_deletedrevs ______________________ self = <tests.site_tests.SiteSysopTestCase testMethod=test_deletedrevs> def test_deletedrevs(self): """Test the site.deletedrevs() method.""" mysite = self.get_site() mainpage = self.get_mainpage() gen = mysite.deletedrevs(total=10, titles=mainpage) > for dr in gen: tests/site_tests.py:1925: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = APISite("en", "wikipedia"), titles = Page(Main Page), start = None end = None, reverse = False, content = False, total = 10, kwargs = {} handle_props = <function handle_props at 0x7fc2b38d7320> err = 'deletedrevs: User:Pywikibot-test not authorized to ' @deprecated_args(step=None, get_text='content', page='titles', limit='total') def deletedrevs(self, titles=None, start=None, end=None, reverse=False, content=False, total=None, **kwargs): """Iterate deleted revisions. Each value returned by the iterator will be a dict containing the 'title' and 'ns' keys for a particular Page and a 'revisions' key whose value is a list of revisions in the same format as recentchanges plus a 'content' element with key '*' if requested when 'content' parameter is set. For older wikis a 'token' key is also given with the content request. @see: U{https://www.mediawiki.org/wiki/API:Deletedrevisions} @param titles: The page titles to check for deleted revisions @type titles: str (multiple titles delimited with '|') or pywikibot.Page or typing.Iterable[pywikibot.Page] or typing.Iterable[str] @keyword revids: Get revisions by their ID @note either titles or revids must be set but not both @param start: Iterate revisions starting at this Timestamp @param end: Iterate revisions ending at this Timestamp @param reverse: Iterate oldest revisions first (default: newest) @type reverse: bool @param content: If True, retrieve the content of each revision @param total: number of revisions to retrieve @keyword user: List revisions by this user @keyword excludeuser: Exclude revisions by this user @keyword tag: Only list revision tagged with this tag @keyword prop: Which properties to get. Defaults are ids, user, comment, flags and timestamp """ def handle_props(props): """Translate deletedrev props to deletedrevisions props.""" if isinstance(props, UnicodeType): props = props.split('|') if self.mw_version >= '1.25': return props old_props = [] for item in props: if item == 'ids': old_props += ['revid', 'parentid'] elif item == 'flags': old_props.append('minor') elif item == 'timestamp': pass else: old_props.append(item) if item == 'content' and self.mw_version < '1.24': old_props.append('token') return old_props if start and end: self.assert_valid_iter_params('deletedrevs', start, end, reverse) if not self.logged_in(): self.login() err = ('deletedrevs: User:{} not authorized to ' .format(self.user())) if 'deletedhistory' not in self.userinfo['rights']: > raise Error(err + 'access deleted revisions.') E Error: deletedrevs: User:Pywikibot-test not authorized to access deleted revisions. pywikibot/site.py:5039: Error ------------------------------ Captured log setup ------------------------------ logging.py 109 VERBOSE Found 1 wikipedia:en processes running, including this one.