jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/422215 )
Change subject: TestSaveFailure.test_nobots: Make sure config.ignore_bot_templates is
False
......................................................................
TestSaveFailure.test_nobots: Make sure config.ignore_bot_templates is False
Bug: T190865
Change-Id: I29aa8cd03f1d313dec3ae4ac336b28a1015b4686
---
M tests/edit_failure_tests.py
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/edit_failure_tests.py b/tests/edit_failure_tests.py
index 68bda27..64600d3 100644
--- a/tests/edit_failure_tests.py
+++ b/tests/edit_failure_tests.py
@@ -8,7 +8,7 @@
These tests use special code 'write = -1' for edit failures.
"""
#
-# (C) Pywikibot team, 2014
+# (C) Pywikibot team, 2014-2018
#
# Distributed under the terms of the MIT license.
#
@@ -16,6 +16,7 @@
import pywikibot
from pywikibot import (
+ config,
Error,
NoPage,
LockedPage,
@@ -26,6 +27,7 @@
PageCreatedConflict,
)
+from tests import patch
from tests.aspects import unittest, TestCase, WikibaseTestCase
@@ -60,7 +62,8 @@
def test_nobots(self):
"""Test that {{nobots}} raise the appropriate
exception."""
page = pywikibot.Page(self.site, 'User:John Vandenberg/nobots')
- self.assertRaisesRegex(OtherPageSaveError, 'nobots', page.save)
+ with patch.object(config, 'ignore_bot_templates', False):
+ self.assertRaisesRegex(OtherPageSaveError, 'nobots', page.save)
def test_touch(self):
"""Test that Page.touch() does not do a real
edit."""
--
To view, visit
https://gerrit.wikimedia.org/r/422215
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I29aa8cd03f1d313dec3ae4ac336b28a1015b4686
Gerrit-Change-Number: 422215
Gerrit-PatchSet: 3
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>