tests.interwikidata_tests module#

Tests for scripts/interwikidata.py.

class tests.interwikidata_tests.DummyBot(**kwargs)[source]#

Bases: IWBot

A dummy bot to prevent editing in production wikis.

Initialize the bot.

create_item()[source]#

Prevent creating items.

put_current()[source]#

Prevent editing.

try_to_add()[source]#

Prevent adding sitelinks to items.

class tests.interwikidata_tests.TestInterwikidataBot(*args, **kwargs)[source]#

Bases: CheckHostnameMixin, SiteAttributeTestCase

Test Interwikidata.

abstract_class = False#
net = True#
site = True#
sites = {'en': {'code': 'en', 'family': 'wikipedia'}, 'fa': {'code': 'fa', 'family': 'wikipedia'}, 'wt': {'code': 'en', 'family': 'wikitech'}}#
test_iw_bot()[source]#

Test IWBot class.

test_main()[source]#

Test main function interwikidata.py.

test_without_repo()[source]#

Test throwing error when site does not have a data repo.