tests.replacebot_tests module#

Tests for the replace script and ReplaceRobot class.

class tests.replacebot_tests.TestReplacementsMain(*args, **kwargs)[source]#

Bases: CheckHostnameMixin, TWNBotTestCase

Test various calls of main().

SUMMARY_CONFIRMATION = 'Press Enter to use this automatic message, or enter a description of the\nchanges your bot will make:'#
abstract_class = False#
cached = False#
code = 'test'#
family = 'wikipedia'#
net = True#
setUp()[source]#

Replace the original bot class with a fake one.

site = True#
sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
tearDown()[source]#

Bring back the old bot class.

test_cmd_and_fix()[source]#

Test command line and fix replacements together.

test_cmd_automatic()[source]#

Test command line replacements with automatic summary.

test_except_title()[source]#

Test excepting and requiring a title specific to fix.

test_fix_callable()[source]#

Test fix replacements using a callable.

test_invalid_replacements()[source]#

Test invalid command line replacement configurations.

test_only_cmd()[source]#

Test command line replacements only.

test_only_fix_all_replacement_summary()[source]#

Test fixes replacements only.

test_only_fix_global_message()[source]#

Test fixes replacements only.

test_only_fix_global_message_tw()[source]#

Test fixes replacements only.

test_only_fix_multiple()[source]#

Test fixes replacements only.

test_only_fix_no_message()[source]#

Test fixes replacements only.

test_only_fix_partial_replacement_summary()[source]#

Test fixes replacements only.