jenkins-bot has submitted this change and it was merged.
Change subject: paraminfo_tests: update and add version checks ......................................................................
paraminfo_tests: update and add version checks
Add watchlist type 'categorize', added in 1.27.0-wmf.4 (MW d40cd42b) Check version for watchlist type 'external', added in 1.20 (MW df0cf1e3)
Check version for content model and format 'json', added in 1.24 (MW d2a82fcb).
Change-Id: I1c8d3c1251df582b4abdf043b1acbb4404f034d6 --- M tests/paraminfo_tests.py 1 file changed, 15 insertions(+), 3 deletions(-)
Approvals: John Vandenberg: Looks good to me, but someone else must approve Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/paraminfo_tests.py b/tests/paraminfo_tests.py index d4fd436..e4b98fb 100644 --- a/tests/paraminfo_tests.py +++ b/tests/paraminfo_tests.py @@ -87,7 +87,15 @@
def test_watchlist_type(self): """Test watchlist type.""" - known = ['edit', 'external', 'new', 'log'] # 'external' is likely new + known = ['edit', 'new', 'log'] + + _version = MediaWikiVersion(self.site.version()) + + if _version >= MediaWikiVersion('1.20'): + known.append('external') + if _version.version >= (1, 27): + if _version >= MediaWikiVersion('1.27.0-wmf.4') or _version.suffix == 'alpha': + known.append('categorize')
self._check_param_values(self.site, 'query+watchlist', 'type', known)
@@ -110,10 +118,12 @@ base = [ 'text/x-wiki', 'text/javascript', - 'application/json', 'text/css', 'text/plain', ] + if MediaWikiVersion(self.site.version()) >= MediaWikiVersion('1.24'): + base.append('application/json') + self._check_param_values(self.site, 'edit', 'contentformat', base) self._check_param_values(self.site, 'parse', 'contentformat', base)
@@ -122,7 +132,6 @@ base = [ 'wikitext', 'javascript', - 'json', 'css', 'text', ] @@ -133,6 +142,9 @@ 'Scribunto', 'JsonSchema', ] + if MediaWikiVersion(self.site.version()) >= MediaWikiVersion('1.24'): + base.append('json') + self._check_param_subset(self.site, 'edit', 'contentmodel', base) self._check_param_subset(self.site, 'parse', 'contentmodel', base)
pywikibot-commits@lists.wikimedia.org