Mpaa created this task. Mpaa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION **Steps to replicate the issue** (include links if applicable): - configure to use oauth for the site used for tests (e.g. en.wikisource in this case) - python -m unittest tests.proofreadpage_tests.TestProofreadPageValidSite.test_url_image **What happens?**: setUpClass (tests.proofreadpage_tests.TestProofreadPageValidSite) ... skipped 'TestProofreadPageValidSite: hostname https://en.wikisource.org/w/index.php failed: HTTP status: 400 - Bad Request' **What should have happened instead?**: the test should proceed Reason is that /index.php does not accept requests with oauth. In [9]: requests.get('https://en.wikisource.org/w/api.php', auth=oauth) Out[9]: <Response [200]> In [10]: requests.get('https://en.wikisource.org/w/index.php', auth=oauth) Out[10]: <Response [400]> hostname = data['hostname'] in setUpClass() of class CheckHostnameMixin(TestCaseBase) is set to ./index.php data['hostname'] is defined in setUpClass() of class TestCase(TestCaseBase, metaclass=MetaTestCaseClass): if 'hostname' not in data and 'site' in data: # Ignore if the family has defined this as # obsolete without a mapping to a hostname. with suppress(KeyError): data['hostname'] = ( data['site'].base_url(data['site'].path())) where data['site'].path() is the path() method of Family(). TASK DETAIL https://phabricator.wikimedia.org/T352606 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Aklapper, pywikibot-bugs-list, Mpaa, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista
_______________________________________________ pywikibot-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
