Huji added a subscriber: Xqt.
Huji added a comment.

  @xqt I think I got this figure out in 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/669584
  
  The unit test has one hacky part where in order to identify the `fileid` of 
the deleted revision so I can undelete it, I call the `site.filearchive()` 
method and I pass the name of the unit test file (which is 
https://test.wikipedia.org/wiki/File:T276725.png by the way). In order to limit 
the number of results returned, I need to pass an end name too, but 
`filearchvie()` does not allow you to pass the same name for both `start` and 
`end` so I added another "g" to the end of "png" to ensure that only entries 
about this file are returned. If you can think of a better way please let me 
know. Note that the `fileid` value changes every time the version is deleted by 
the previous lines of the unit test so unlike the timestamp, we cannot hard 
code it into the unit test.

TASK DETAIL
  https://phabricator.wikimedia.org/T276725

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Huji
Cc: Xqt, Aklapper, Huji, pywikibot-bugs-list, Jyoo1011, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to