Page MenuHomePhabricator

Pywikibot does not raise TitleblacklistError in edit_failure_tests
Closed, ResolvedPublic

Description

The reason might be that Pywikibot-test account has sysop rights on test-wiki

_____________________ TestSaveFailure.test_titleblacklist ______________________

self = <tests.edit_failure_tests.TestSaveFailure testMethod=test_titleblacklist>

    def test_titleblacklist(self):
        """Test that title blacklist raise the appropriate exception."""
        page = pywikibot.Page(self.site, 'User:UpsandDowns1234/Blacklisttest')
        with self.assertRaises(TitleblacklistError):
>           page.save()
E           AssertionError: TitleblacklistError not raised

tests/edit_failure_tests.py:64: AssertionError

See also T199071

Event Timeline

Xqt triaged this task as High priority.
Xqt updated the task description. (Show Details)

Change #1041631 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] skip test_titleblacklist when running test as sysop

https://gerrit.wikimedia.org/r/1041631

Change #1041631 merged by jenkins-bot:

[pywikibot/core@master] [tests] skip test_titleblacklist when running test as sysop

https://gerrit.wikimedia.org/r/1041631