Xqt submitted this change.

View Change

Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
[bugfix] botMayEdit has no function cache_clear()

After dopping lru_cache fix tests accordingly

Change-Id: Id2157cda3319d47e0df8462cc488f7bc3de0658d
---
M tests/page_tests.py
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/page_tests.py b/tests/page_tests.py
index 5e59ec3..ffd1b98 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -760,7 +760,7 @@

def tearDown(self):
"""Cleanup cache."""
- self.page.botMayEdit.cache_clear()
+ del self.page._bot_may_edit
super().tearDown()

def _run_test(self, template, user, expected_result):
@@ -769,7 +769,7 @@
self.page._text = template % {'user': user}
with self.subTest(template=template, user=user):
self.assertEqual(self.page.botMayEdit(), expected_result)
- self.page.botMayEdit.cache_clear()
+ del self.page._bot_may_edit

@mock.patch.object(config, 'ignore_bot_templates', False)
def test_bot_may_edit_nobots_ok(self):
@@ -842,7 +842,7 @@
self.page._text = '{{bots|%s=}}' % param
with self.subTest(template=self.page.text, user=user, param=param):
self.assertTrue(self.page.botMayEdit())
- self.page.botMayEdit.cache_clear()
+ del self.page._bot_may_edit

@mock.patch.object(config, 'ignore_bot_templates', False)
def test_bot_may_edit_bots_nok(self):

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Id2157cda3319d47e0df8462cc488f7bc3de0658d
Gerrit-Change-Number: 697622
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged