Page MenuHomePhabricator

site_tests.TestAlldeletedrevisionsWithoutUser test methods fail with KeyError
Closed, ResolvedPublicBUG REPORT

Description

======================================================================
FAIL: test_prefix (tests.site_tests.TestAlldeletedrevisionsWithoutUser)
Test the site.alldeletedrevisions() method with prefix.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/wikimedia/pywikibot/tests/site_tests.py", line 1815, in test_prefix
    self.assertIn(key, drev)
AssertionError: 'parentid' not found in {'user': 'Meco', 'timestamp': '2006-05-12T13:50:22Z', 'revid': 860412}

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript
Xqt renamed this task from ite_tests.TestAlldeletedrevisionsWithoutUser test methods fail with KeyError to site_tests.TestAlldeletedrevisionsWithoutUser test methods fail with KeyError.Jan 22 2021, 2:26 PM
Xqt triaged this task as High priority.
Xqt changed the subtype of this task from "Task" to "Bug Report".

Change 657876 had a related patch set uploaded (by JJMC89; owner: JJMC89):
[pywikibot/core@master] [tests] parentid not in all alldeletedrevisions responses

https://gerrit.wikimedia.org/r/657876

Change 657876 merged by Xqt:
[pywikibot/core@master] [tests] parentid not in all alldeletedrevisions responses

https://gerrit.wikimedia.org/r/657876

I don't know why some have a parentid and others don't. Here are two deleted edits from enwiki by the same user, one with and one without. Looking at the deleted edits themselves, I don't see why they would be different.

{
    "pageid": 18690151,
    "revisions": [
        {
            "revid": 181205920,
            "minor": "",
            "user": "LordAnubisBOT",
            "timestamp": "2007-12-31T16:17:29Z"
        }
    ],
    "ns": 0,
    "title": "Sheffield Medical School"
},
{
    "pageid": 0,
    "revisions": [
        {
            "revid": 181203877,
            "parentid": 167902014,
            "minor": "",
            "user": "LordAnubisBOT",
            "timestamp": "2007-12-31T16:04:54Z"
        }
    ],
    "ns": 0,
    "title": "George Elcoat"
},