Page MenuHomePhabricator

pagegenerators_tests.TestFactoryGeneratorNewpages fails for test_newpages_ns_default_commons
Closed, DeclinedPublic

Description

=================================== FAILURES ===================================
________ TestFactoryGeneratorNewpages.test_newpages_ns_default_commons _________

self = <tests.pagegenerators_tests.TestFactoryGeneratorNewpages testMethod=test_newpages_ns_default_commons>

    def wrapped_method(self):
        sitedata = self.sites[key]
        self.site_key = key
        self.family = sitedata['family']
        self.code = sitedata['code']
        self.site = sitedata['site']
>       func(self, key)

tests/aspects.py:715: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/pagegenerators_tests.py:1278: in test_newpages_ns_default
    self.assertPagesInNamespaces(gen, 0)
tests/aspects.py:207: in assertPagesInNamespaces
    self.assertPageInNamespaces(page, namespaces)
tests/aspects.py:142: in assertPageInNamespaces
    '{} not in namespace {!r}'.format(page, namespaces))
E   AssertionError: [[commons:User talk:Mountainhead]] not in namespace set([0])
=============================== warnings summary ===============================

https://api.travis-ci.org/v3/job/480794501/log.txt

The reason is a wrong api result:
https://commons.wikimedia.org/w/api.php?rcprop=user%7Ccomment%7Ctimestamp%7Ctitle%7Cids%7Csizes%7Credirect%7Cloginfo%7Cflags%7Ctags&list=recentchanges&action=query&indexpageids=&continue=&rcnamespace=0&rctype=new&rcshow=!redirect%7C!bot&rclimit=100&meta=userinfo&uiprop=blockinfo%7Chasmsg&maxlag=5&format=jsonfm

gives "ns": 0 for "title": "User talk:mountainhead"

{
                "type": "new",
                "ns": 0,
                "title": "User talk:mountainhead",
                "pageid": 75898401,
                "revid": 335082426,
                "old_revid": 0,
                "rcid": 1177906396,
                "user": "Willy1018",
                "new": "",
                "oldlen": 0,
                "newlen": 326,
                "timestamp": "2019-01-16T21:36:47Z",
                "comment": "Some of your [[Commons:Deletion requests/Files in Category:Logos of companies|uploads have been nominated for deletion]].",
                "tags": [
                    "VisualFileChange"
                ]
            },

Event Timeline

Xqt created this task.Jan 19 2019, 3:46 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJan 19 2019, 3:46 PM
Xqt triaged this task as Low priority.Jan 19 2019, 3:46 PM
Xqt changed the task status from Open to Stalled.Jan 20 2019, 9:32 AM

Can't do anything on pwb's side I guess

Xqt closed this task as Declined.Apr 1 2019, 12:19 PM

Data too old