jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1042246?usp=email )

Change subject: [tests] fix invalid level test in 
TestSiteSysopWrite.test_protect_exception()
......................................................................

[tests] fix invalid level test in TestSiteSysopWrite.test_protect_exception()

Bug: T367296
Change-Id: I619163e1330939498921ea20881bf72f56a0e562
---
M tests/site_tests.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved




diff --git a/tests/site_tests.py b/tests/site_tests.py
index f613729..6df2d92 100755
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -19,6 +19,7 @@
 from pywikibot import config
 from pywikibot.exceptions import (
     APIError,
+    Error,
     IsNotRedirectPageError,
     NoPageError,
     PageInUseError,
@@ -630,7 +631,7 @@
                          page=page, reason='Pywikibot unit test')

         with self.subTest(test='anInvalidLevel'), \
-             self.assertRaises(AssertionError):
+             self.assertRaisesRegex(Error, 'Invalid protection level'):
             site.protect(protections={'edit': 'anInvalidLevel'},
                          page=page, reason='Pywikibot unit test')


--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1042246?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: I619163e1330939498921ea20881bf72f56a0e562
Gerrit-Change-Number: 1042246
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[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]

Reply via email to