jenkins-bot submitted this change.

View Change

Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
[tests] protection are given as 'infinite' instead 'infinity' in tests

Change-Id: I5f6b174807864e4570f6a6affd4c63bd6613a9a5
---
M tests/page_tests.py
M tests/site_tests.py
2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/tests/page_tests.py b/tests/page_tests.py
index ea4dfd8..07c4f0c 100755
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -1139,8 +1139,8 @@
p1.protect(protections={'edit': 'sysop', 'move': 'autoconfirmed'},
reason='Pywikibot unit test')
self.assertEqual(p1.protection(),
- {'edit': ('sysop', 'infinity'),
- 'move': ('autoconfirmed', 'infinity')})
+ {'edit': ('sysop', 'infinite'),
+ 'move': ('autoconfirmed', 'infinite')})

p1.protect(protections={'edit': '', 'move': ''},
reason='Pywikibot unit test')
@@ -1154,8 +1154,8 @@
p1.protect(protections={'edit': 'sysop', 'move': 'autoconfirmed'},
reason='Pywikibot unit test')
self.assertEqual(p1.protection(),
- {'edit': ('sysop', 'infinity'),
- 'move': ('autoconfirmed', 'infinity')})
+ {'edit': ('sysop', 'infinite'),
+ 'move': ('autoconfirmed', 'infinite')})

p1.protect(reason='Pywikibot unit test')
self.assertEqual(p1.protection(), {})
@@ -1168,8 +1168,8 @@
p1.protect(protections={'edit': 'sysop', 'move': 'autoconfirmed'},
reason='Pywikibot unit test')
self.assertEqual(p1.protection(),
- {'edit': ('sysop', 'infinity'),
- 'move': ('autoconfirmed', 'infinity')})
+ {'edit': ('sysop', 'infinite'),
+ 'move': ('autoconfirmed', 'infinite')})
# workaround
p1 = pywikibot.Page(site, 'User:Unicodesnowman/ProtectTest')
p1.protect(protections={'edit': '', 'move': ''},
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 3933ae2..7dfa510 100755
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""Tests for the site module."""
#
-# (C) Pywikibot team, 2008-2023
+# (C) Pywikibot team, 2008-2024
#
# Distributed under the terms of the MIT license.
#
@@ -568,8 +568,8 @@
reason='Pywikibot unit test')
self.assertIsNone(r)
self.assertEqual(site.page_restrictions(page=p1),
- {'edit': ('sysop', 'infinity'),
- 'move': ('autoconfirmed', 'infinity')})
+ {'edit': ('sysop', 'infinite'),
+ 'move': ('autoconfirmed', 'infinite')})

expiry = pywikibot.Timestamp.fromISOformat('2050-01-01T00:00:00Z')
site.protect(protections={'edit': 'sysop', 'move': 'autoconfirmed'},
@@ -597,8 +597,8 @@
reason='Pywikibot unit test')
self.assertIsNone(r)
self.assertEqual(site.page_restrictions(page=p1),
- {'edit': ('sysop', 'infinity'),
- 'move': ('autoconfirmed', 'infinity')})
+ {'edit': ('sysop', 'infinite'),
+ 'move': ('autoconfirmed', 'infinite')})

p1 = pywikibot.Page(site, 'User:Unicodesnowman/ProtectTest')
expiry = pywikibot.Timestamp.fromISOformat('2050-01-01T00:00:00Z')

To view, visit change 1041125. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I5f6b174807864e4570f6a6affd4c63bd6613a9a5
Gerrit-Change-Number: 1041125
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot