tests.add_text_tests module#

Test add_text script.

class tests.add_text_tests.TestAddTextScript(*args, **kwargs)[source]#

Bases: DisconnectedSiteMixin, TestCase

Test add_text script.

abstract_class = False#
code = 'en'#
dry = True#
family = 'wikipedia'#
setUp()[source]#

Setup test.

site = True#
sites = {'wikipedia:en': {'code': 'en', 'family': 'wikipedia'}}#
test_argument_prompt(input_mock)[source]#

Reqest an argument that requres a prompt.

test_both_text_arguments()[source]#

Provide both -text and -textfile.

test_main_no_arguments()[source]#

Invoke our main method without any arguments.

test_main_no_generator_found()[source]#

Invoke main when our generator_factory can’t provide a generator.

test_main_unrecognized_argument()[source]#

Invoke our main method with an invalid argument.

test_neither_text_argument()[source]#

Don’t provide either -text or -textfile.

test_not_skipped()[source]#

Exercise skip_page() with a page we should accept.

test_parse()[source]#

Basic argument parsing.

test_setup_with_text()[source]#

Exercise bot with a -text argument.

test_setup_with_textfile(mock_file)[source]#

Exercise both with a -textfile argument.

test_skip_if_redirect()[source]#

Exercise skip_page() with a page that is a redirect.

test_skip_if_url_match()[source]#

Exercise skip_page() with a ‘-excepturl’ argument.

test_skip_missing_standard()[source]#

Exercise skip_page() with a non-talk page that doesn’t exist.

test_skip_missing_standard_with_create()[source]#

Exercise skip_page() with -create option for a non-talk page.

test_skip_missing_talk()[source]#

Exercise skip_page() with a talk page that doesn’t exist.

test_unrecognized_argument()[source]#

Provide an argument that doesn’t exist.