jenkins-bot submitted this change.
[IMPR] update TestAlldeletedrevisionsAsUser.test_basic
It was intended to check that each deleted revision is a dict.
Follows-Up: I5c04d8bc928472ceb15fc0f58130c2c20cabcff0
Change-Id: I7f9b9bdf8f6d7f76fa10bcde8fb325e25d37d4e5
---
M tests/site_tests.py
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 1ea2c8d..6a2da89 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1610,19 +1610,21 @@
def test_basic(self):
"""Test the site.alldeletedrevisions() method."""
mysite = self.get_site()
- drev = list(mysite.alldeletedrevisions(user=mysite.user(), total=10))
+ result = list(mysite.alldeletedrevisions(user=mysite.user(), total=10))
- if not drev:
+ if not result:
self.skipTest('No deleted revisions available')
- for data in drev:
+ for data in result:
with self.subTest(data=data):
self.assertIsInstance(data, dict)
self.assertIn('revisions', data)
self.assertIsInstance(data['revisions'], list)
- for rev in data['revisions']:
- self.assertEqual(mysite.user(), rev.get('user'))
+ for drev in data['revisions']:
+ self.assertIsInstance(drev, dict)
+ self.assertIn('user', drev)
+ self.assertEqual(drev['user'], mysite.user())
def test_namespaces(self):
"""Test the site.alldeletedrevisions() method using namespaces."""
To view, visit change 709237. To unsubscribe, or for help writing mail filters, visit settings.