tests.wikibase_edit_tests module#

Tests for editing Wikibase items.

Tests which should fail should instead be in the TestWikibaseSaveTest class in edit_failiure_tests.py

class tests.wikibase_edit_tests.TestWikibaseAddClaimToExisting(*args, **kwargs)[source]#

Bases: RequireLoginMixin, SiteWriteMixin, CheckHostnameMixin, WikibaseTestCase

Run wikibase write tests for claims.

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

Make multiple changes with EditEntity.

wikibase = True#
write = True#
class tests.wikibase_edit_tests.TestWikibaseDataSiteWbsetActions(*args, **kwargs)[source]#

Bases: RequireLoginMixin, SiteWriteMixin, CheckHostnameMixin, WikibaseTestCase

Run general wikibase write tests.

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

Setup tests.

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

Tear down tests.

test_wbsetlabel_remove_from_item()[source]#

Test removing an Italian label using item.

test_wbsetlabel_set_from_id()[source]#

Test setting an Italian label using id.

Test setting a sitelink using id.

wikibase = True#
write = True#
class tests.wikibase_edit_tests.TestWikibaseMakeClaim(*args, **kwargs)[source]#

Bases: RequireLoginMixin, SiteWriteMixin, CheckHostnameMixin, WikibaseTestCase

Run wikibase write tests for claims.

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

Attempt adding a Coordinate with globe set via item.

test_WbGeoShape_edit()[source]#

Attempt adding a geo-shape with valid input.

test_WbMonolingualText_edit()[source]#

Attempt adding a monolingual text with valid input.

test_WbQuantity_edit()[source]#

Attempt adding a quantity with valid input.

test_WbQuantity_edit_unbound()[source]#

Attempt adding a quantity with unbound errors.

test_WbTabularData_edit()[source]#

Attempt adding a tabular-data with valid input.

test_identifier_edit()[source]#

Attempt adding an external identifier claim with valid input.

test_math_edit()[source]#

Attempt adding a math claim with valid input.

test_musical_notation_edit()[source]#

Attempt adding a musical notation claim with valid input.

wikibase = True#
write = True#
class tests.wikibase_edit_tests.TestWikibaseRemoveQualifier(*args, **kwargs)[source]#

Bases: RequireLoginMixin, SiteWriteMixin, CheckHostnameMixin, WikibaseTestCase

Run wikibase write tests to remove qualifiers.

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

Add a claim with two qualifiers.

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

Test adding a claim with two qualifiers, then removing both.

test_remove_single()[source]#

Test adding a claim with two qualifiers, then removing one.

wikibase = True#
write = True#
class tests.wikibase_edit_tests.TestWikibaseWriteGeneral(*args, **kwargs)[source]#

Bases: RequireLoginMixin, SiteWriteMixin, CheckHostnameMixin, WikibaseTestCase

Run general wikibase write tests.

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

Test adding a claim with a qualifier to an item and a property.

test_alias_set()[source]#

Test setting an English alias.

test_edit_entity_new_item()[source]#

Test creating a new item using ItemPage.editEntity.

test_edit_entity_new_linked_item()[source]#

Test linking a page using a new item.

test_edit_entity_new_property()[source]#

Test creating a new property using PropertyPage.editEntity.

test_label_remove()[source]#

Test adding a Farsi and English label and removing the Farsi one.

test_label_set()[source]#

Test setting an English label.

test_set_redirect_target()[source]#

Test set_redirect_target method.

wikibase = True#
write = True#