jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/485502 )
Change subject: [bugfix] Fix expected_params for several tests ......................................................................
[bugfix] Fix expected_params for several tests
- Fix expected_params for test_pagelinks and test_pagetemplates: the simplified continuation with 'continue' parameter is added for mw >= 1.21 only (see QueryGenerator.__init__())
Bug: T214266 Change-Id: I98e6b78ff0bad8682ec0a5aff0102e0b607da0de --- M tests/site_tests.py 1 file changed, 8 insertions(+), 2 deletions(-)
Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/site_tests.py b/tests/site_tests.py index 203583d..6f6dc77 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -576,7 +576,10 @@ 'iiprop': ['timestamp', 'user', 'comment', 'url', 'size', 'sha1', 'metadata'], 'generator': ['templates'], 'action': ['query'], - 'indexpageids': [True], 'continue': [True]} + 'indexpageids': [True]} + if self.site.mw_version >= '1.21': + expected_params['continue'] = [True] + self.assertEqual(tl_gen.request._params, expected_params)
tl_gen = self.site.pagetemplates(self.mainpage, namespaces=[10]) @@ -607,11 +610,14 @@ 'iilimit': ['max'], 'iiprop': ['timestamp', 'user', 'comment', 'url', 'size', 'sha1', 'metadata'], 'generator': ['links'], - 'action': ['query'], 'indexpageids': [True], 'continue': [True]} + 'action': ['query'], 'indexpageids': [True]} if 'pageids' in gen_params: expected_params['pageids'] = [str(self.mainpage.pageid)] else: expected_params['titles'] = [self.mainpage.title()] + if self.site.mw_version >= '1.21': + expected_params['continue'] = [True] + self.assertEqual(gen_params, expected_params)
links_gen = self.site.pagelinks(self.mainpage, namespaces=[0, 1])
pywikibot-commits@lists.wikimedia.org