tests.edit_tests module#

Tests for editing pages.

class tests.edit_tests.OAuthEditTest(*args, **kwargs)[source]#

Bases: RequireLoginMixin, SiteWriteMixin, CheckHostnameMixin, OAuthSiteTestCase

Run edit test with OAuth enabled.

abstract_class = False#
code = 'test'#
family = 'wikipedia'#
login = True#
net = True#
oauth = True#
setUp()[source]#

Set up test by checking site and initialization.

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

Tear down test by resetting config.authenticate.

test_edit()[source]#

Test editing to a page.

write = True#
class tests.edit_tests.TestGeneralWrite(*args, **kwargs)[source]#

Bases: RequireLoginMixin, SiteWriteMixin, CheckHostnameMixin, TestCase

Run general write tests.

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

Test writing to a page without preloading the .text.

test_async()[source]#

Test writing to a page.

test_createonly()[source]#

Test save with createonly enforced.

write = True#
class tests.edit_tests.TestSiteMergeHistory(*args, **kwargs)[source]#

Bases: RequireLoginMixin, NeedRightsMixin, SiteWriteMixin, CheckHostnameMixin, TestCase

Test history merge action.

abstract_class = False#
code = 'test'#
family = 'wikipedia'#
login = True#
net = True#
rights = 'mergehistory'#
setup_test_pages()[source]#

Helper function to set up pages that we will use in these tests.

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

Test Site.merge_history functionality.

test_merge_history_validation()[source]#

Test Site.merge_history validity checks.

write = True#