Anpans has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401083 )

Change subject: Provide Test for site.botusers() method #GCI2017
......................................................................

Provide Test for site.botusers() method #GCI2017

Change-Id: I066eecb25358ae054d7abc925574550153a83a6a
---
M tests/site_tests.py
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/83/401083/1

diff --git a/tests/site_tests.py b/tests/site_tests.py
index bd77485..2ff87e5 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -749,6 +749,18 @@
             self.assertIsInstance(cat, pywikibot.Category)
             self.assertLessEqual(cat.title(withNamespace=False), "Hij")
 
+    def test_botusers(self):
+        """Test the site.botusers() method."""
+        mysite = self.get_site()
+        bu = list(mysite.botusers(total=10))
+        self.assertLessEqual(len(bu), 10)
+        for botuser in bu:
+            self.assertIsInstance(botuser, dict)
+            self.assertIn("name", botuser)
+            self.assertIn("userid", botuser)
+            self.assertIn("editcount", botuser)
+            self.assertIn("registration", botuser)
+
     def test_allusers(self):
         """Test the site.allusers() method."""
         mysite = self.get_site()

-- 
To view, visit https://gerrit.wikimedia.org/r/401083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I066eecb25358ae054d7abc925574550153a83a6a
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Anpans <anpans...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to