tests.redirect_bot_tests module#

Tests for the redirect.py script.

class tests.redirect_bot_tests.RedirectTestRobot(action, **kwargs)[source]#

Bases: RedirectRobot

RedirectRobot test class.

property current_page#

Patch current_page to return any page.

property site#

Patch site to return a site object.

class tests.redirect_bot_tests.TestGetSDTemplateNoSysop(*args, **kwargs)[source]#

Bases: CheckHostnameMixin, DefaultSiteTestCase

Test the get_sd_template method of the RedirectRobot class.

abstract_class = False#
code = 'test'#
family = 'wikipedia'#
net = True#
site = True#
sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
test_with_delete_and_existing_sdtemplate()[source]#

Test with delete and existing sdtemplate.

test_with_delete_and_i18n_sd()[source]#

Test with delete and i18n template.

test_with_delete_and_non_existing_sdtemplate()[source]#

Test with delete and non-exisitng sdtemplate.

test_with_delete_no_sd_no_i18n()[source]#

Test with delete and no i18n template.