tests.thanks_tests module#

Tests for thanks-related code.

class tests.thanks_tests.TestThankRevision(*args, **kwargs)[source]#

Bases: RequireLoginMixin, SiteWriteMixin, CheckHostnameMixin, TestCase

Test thanks for revisions.

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

Test that thanking oneself causes an error.

This test is not in TestThankRevisionErrors because it may require making a successful edit in order to test the API call thanking the user running the test.

test_thank_revision()[source]#

Test thanks for normal revisions.

Note

This test relies on activity in recentchanges, and there must make edits made before reruns of this test.

See also

T137836.

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

Bases: RequireLoginMixin, SiteWriteMixin, CheckHostnameMixin, TestCase

Test errors when thanking revisions.

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

Test that thanking a bad recipient causes an error.

test_invalid_revision()[source]#

Test that passing an invalid revision ID causes an error.

write = -1#