jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1345995?usp=email )
Change subject: tests: Use distinct labels for new property creation
......................................................................
tests: Use distinct labels for new property creation
Property labels must be unique, but the creation test only added its
timestamp to the description. Its fixed label conflicts with P93593.
Include the existing timestamp in the label to avoid collisions with
properties created by earlier runs.
Reload the created property and check its English label. Keep the
test focused on creating a new property through PropertyPage.editEntity.
Bug: T367323
Change-Id: I366355a2d530a8cc515c66b9e1ff8ece72bd9882
---
M tests/wikibase_edit_tests.py
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/wikibase_edit_tests.py b/tests/wikibase_edit_tests.py
index 0ca7e76..6de93a6 100755
--- a/tests/wikibase_edit_tests.py
+++ b/tests/wikibase_edit_tests.py
@@ -159,7 +159,6 @@
self.assertIs(qual.on_item, item)
self.assertIs(ref.on_item, item)
- @unittest.expectedFailure # T367323
def test_edit_entity_new_property(self) -> None:
"""Test creating a new property using ``PropertyPage.editEntity``."""
testsite = self.get_repo()
@@ -168,7 +167,7 @@
'labels': {
'en': {
'language': 'en',
- 'value': 'Pywikibot test new property',
+ 'value': 'Pywikibot test new property - ' + ts,
}
},
'descriptions': {
@@ -180,6 +179,8 @@
}
prop = pywikibot.PropertyPage(testsite, datatype='string')
prop.editEntity(data)
+ prop.get(force=True)
+ self.assertEqual(prop.labels['en'], data['labels']['en']['value'])
def test_edit_entity_new_linked_item(self) -> None:
"""Test linking a page using a new item."""
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1345995?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I366355a2d530a8cc515c66b9e1ff8ece72bd9882
Gerrit-Change-Number: 1345995
Gerrit-PatchSet: 2
Gerrit-Owner: Mahveotm <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]