jenkins-bot submitted this change.

View Change


Approvals: Matěj Suchánek: Looks good to me, approved jenkins-bot: Verified
[fix] Fix TestCategoryObject.test_redirects() tests

Bug: T339819
Change-Id: I4bafab1f0e9c12d693c3f38c5427e3e56bcf81cf
---
M tests/category_tests.py
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/tests/category_tests.py b/tests/category_tests.py
index bb27d10..25d0030 100755
--- a/tests/category_tests.py
+++ b/tests/category_tests.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""Tests for the Category class."""
#
-# (C) Pywikibot team, 2014-2022
+# (C) Pywikibot team, 2014-2023
#
# Distributed under the terms of the MIT license.
#
@@ -183,8 +183,9 @@

# Invalid title case
cat3 = pywikibot.Category(site, '2021 establishments in Orissa')
+ cat3.text = ('{{Category redirect|'
+ '{{title year}} establishments in Odisha}}')
cat4 = pywikibot.Category(site, '2021 establishments in Odisha')
- self.assertIn('{{title year}}', cat3.text)
self.assertTrue(cat3.isCategoryRedirect())
self.assertFalse(cat4.isCategoryRedirect())
tgt = cat3.getCategoryRedirectTarget()

To view, visit change 930936. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I4bafab1f0e9c12d693c3f38c5427e3e56bcf81cf
Gerrit-Change-Number: 930936
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia@gmail.com>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged