jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] patrol_tests: Define dry author namespace ......................................................................
[FIX] patrol_tests: Define dry author namespace
The patrol tests were testing a feature which also uses a wikisource specific feature and require a namespace for the given author namespace number. This adds a namespace for that author namespace number.
Change-Id: I6b57acc4f8d1639ca0963b39171212ab28c9136c --- M tests/utils.py 1 file changed, 9 insertions(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/utils.py b/tests/utils.py index b4335be..b2488f9 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -382,7 +382,15 @@ self._msgcache = {'*': 'dummy entry', 'hello': 'world'}
def _build_namespaces(self): - return Namespace.builtin_namespaces(case=self.siteinfo['case']) + ns_dict = Namespace.builtin_namespaces(case=self.siteinfo['case']) + if hasattr(self.family, 'authornamespaces'): + assert len(self.family.authornamespaces[self.code]) <= 1 + if self.family.authornamespaces[self.code]: + author_ns = self.family.authornamespaces[self.code][0] + assert author_ns not in ns_dict + ns_dict[author_ns] = Namespace( + author_ns, 'Author', case=self.siteinfo['case']) + return ns_dict
@property def userinfo(self):
pywikibot-commits@lists.wikimedia.org