Page MenuHomePhabricator

test_cosmetic_changes_hook of i18n_tests.MissingPackageTestCase fails for wikidata due to content model
Closed, ResolvedPublic

Description

______________ MissingPackageTestCase.test_cosmetic_changes_hook _______________

self = <tests.i18n_tests.MissingPackageTestCase testMethod=test_cosmetic_changes_hook>

    def test_cosmetic_changes_hook(self):
        """Test summary result of Page._cosmetic_changes_hook."""
        page = pywikibot.Page(self.site, 'Test')
        page.text = 'Some    content    with    spaces.'
        # check cc settings
        old_setting = config.cosmetic_changes_mylang_only
        config.cosmetic_changes_mylang_only = False
        self.assertFalse(page.isTalkPage())
>       self.assertEqual(page.content_model, 'wikitext')
E       AssertionError: 'wikibase-item' != 'wikitext'
E       - wikibase-item
E       + wikitext

tests/i18n_tests.py:549: AssertionError

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript
Xqt triaged this task as High priority.

Change 667539 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [fix] fix MissingPackageTestCase.test_cosmetic_changes_hook

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

Change 667539 merged by jenkins-bot:
[pywikibot/core@master] [fix] fix MissingPackageTestCase.test_cosmetic_changes_hook

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