jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/860962 )
Change subject: [test] Test deprecation message for Site.messages()
......................................................................
[test] Test deprecation message for Site.messages()
Change-Id: I89dd38bd88490291833a2c3d485e7dc5a4b5eef6
---
M tests/site_tests.py
1 file changed, 16 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 04178a9..aa503af 100755
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -323,7 +323,7 @@
site.unlock_page(page=p1)
-class SiteUserTestCase(DefaultSiteTestCase):
+class SiteUserTestCase(DefaultSiteTestCase, DeprecationTestCase):
"""Test site method using a user."""
@@ -333,7 +333,6 @@
"""Test user related methods."""
mysite = self.get_site()
self.assertIsInstance(mysite.is_blocked(), bool)
- self.assertIsInstance(mysite.messages(), bool)
self.assertIsInstance(mysite.has_right('edit'), bool)
self.assertFalse(mysite.has_right('nonexistent_right'))
self.assertIsInstance(mysite.has_group('bots'), bool)
@@ -344,6 +343,12 @@
'nosuchright'):
self.assertIsInstance(mysite.has_right(rgt), bool)
+ def test_deprected_methods(self):
+ """Test deprecated user related methods."""
+ mysite = self.get_site()
+ self.assertIsInstance(mysite.messages(), bool)
+ self.assertOneDeprecation()
+
def test_logevents(self):
"""Test the site.logevents() method."""
mysite = self.get_site()
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/860962
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I89dd38bd88490291833a2c3d485e7dc5a4b5eef6
Gerrit-Change-Number: 860962
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]