Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
____________________ SearchTestCase.test_search_where_title
____________________
self = <tests.site_tests.SearchTestCase testMethod=test_search_where_title>
@suppress_warnings("where='title' is deprecated", FutureWarning)
def test_search_where_title(self):
"""Test site.search() method with 'where' parameter set to title."""
search_gen = self.site.search(
'wiki', namespaces=0, total=10, where='title')
expected_params = {
'prop': ['info', 'imageinfo', 'categoryinfo'],
'inprop': ['protection'],
'iiprop': [
'timestamp', 'user', 'comment', 'url', 'size', 'sha1',
'metadata'],
'iilimit': ['max'], 'generator': ['search'], 'action':
['query'],
'indexpageids': [True], 'continue': [True], 'gsrnamespace': [0]}
if self.site.has_extension('CirrusSearch'):
expected_params.update({
'gsrsearch': ['intitle:wiki'], 'gsrwhat': [None]})
else:
expected_params.update({
'gsrsearch': ['wiki'], 'gsrwhat': ['title']})
> self.assertEqual(search_gen.request._params, expected_params)
E AssertionError: {'gsrsearch': ['wiki'], 'gsrwhat': ['title'[280
chars] [0]} != {'prop': ['info', 'imageinfo', 'categoryinf[285 chars]one]}
E {'action': ['query'],
E 'continue': [True],
E 'generator': ['search'],
E 'gsrnamespace': [0],
E - 'gsrsearch': ['wiki'],
E + 'gsrsearch': ['intitle:wiki'],
E ? ++++++++
E
E - 'gsrwhat': ['title'],
E ? ^^^^^ -
E
E + 'gsrwhat': [None],
E ? ^^^
E
E 'iilimit': ['max'],
E 'iiprop': ['timestamp', 'user', 'comment', 'url', 'size',
'sha1', 'metadata'],
E 'indexpageids': [True],
E 'inprop': ['protection'],
E 'prop': ['info', 'imageinfo', 'categoryinfo']}
tests/site_tests.py:1459: AssertionError
https://api.travis-ci.com/v3/job/521215966/log.txt
TASK DETAIL
https://phabricator.wikimedia.org/T286119
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Aklapper, atagar, Xqt, 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 -- [email protected]
To unsubscribe send an email to [email protected]