jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/522883 )

Change subject: test(test_access_denied_notexist_username): update the error 
message
......................................................................

test(test_access_denied_notexist_username): update the error message

Apparently the error message has changed slightly in MW 1.34.0-wmf.13,
however I was not able to locate the change that has caused this.

Bug: T227951
Change-Id: I3e82fa0e45cfc1a63d29485ec91a77071902c5b9
---
M tests/api_tests.py
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/tests/api_tests.py b/tests/api_tests.py
index f08dbe8..18d7603 100644
--- a/tests/api_tests.py
+++ b/tests/api_tests.py
@@ -1022,7 +1022,10 @@
         self.assertRaises(pywikibot.NoUsername, req.submit)
         # FIXME: T100965
         self.assertRaises(api.APIError, req.submit)
-        error.assert_called_with('Login failed (Failed).')
+        try:
+            error.assert_called_with('Login failed (readapidenied).')
+        except AssertionError:  # MW version is older than 1.34.0-wmf.13
+            error.assert_called_with('Login failed (Failed).')
         warning.assert_called_with(
             'API error readapidenied: '
             'You need read permission to use this module.')

--
To view, visit https://gerrit.wikimedia.org/r/522883
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3e82fa0e45cfc1a63d29485ec91a77071902c5b9
Gerrit-Change-Number: 522883
Gerrit-PatchSet: 2
Gerrit-Owner: Dalba <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to