jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/914364 )
Change subject: [tsts] Skip QueryStringParamsTestCase on ServerError ...................................................................... [tsts] Skip QueryStringParamsTestCase on ServerError Change-Id: Iddc503bceacc6d0684b86d35bf860782d2810d0f --- M tests/http_tests.py 1 file changed, 19 insertions(+), 11 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/http_tests.py b/tests/http_tests.py index b84eaa5..580ff4f 100755 --- a/tests/http_tests.py +++ b/tests/http_tests.py @@ -494,8 +494,7 @@ class QueryStringParamsTestCase(HttpbinTestCase): - """ - Test the query string parameter of request methods. + """Test the query string parameter of request methods. The /get endpoint of httpbin returns JSON that can include an 'args' key with urldecoded query string parameters. @@ -508,12 +507,12 @@ def test_no_params(self): """Test fetch method with no parameters.""" - r = http.fetch(self.url, params={}) + r = self.fetch(self.url, params={}) fail_status = HTTPStatus.SERVICE_UNAVAILABLE if r.status_code == fail_status: # T203637 - self.skipTest('{status.value}: {status.description} for {url}' - .format(status=fail_status, url=self.url)) + self.skipTest(f'{fail_status.value}: {fail_status.description} ' + f'for {self.url}') self.assertEqual(r.status_code, HTTPStatus.OK) self.assertEqual(r.json()['args'], {}) @@ -525,12 +524,12 @@ HTTPBin returns the args in their urldecoded form, so what we put in should be the same as what we get out. """ - r = http.fetch(self.url, params={'fish&chips': 'delicious'}) + r = self.fetch(self.url, params={'fish&chips': 'delicious'}) fail_status = HTTPStatus.SERVICE_UNAVAILABLE if r.status_code == fail_status: # T203637 - self.skipTest('{status.value}: {status.description} for {url}' - .format(status=fail_status, url=self.url)) + self.skipTest(f'{fail_status.value}: {fail_status.description} ' + f'for {self.url}') self.assertEqual(r.status_code, HTTPStatus.OK) self.assertEqual(r.json()['args'], {'fish&chips': 'delicious'}) @@ -542,12 +541,12 @@ HTTPBin returns the args in their urldecoded form, so what we put in should be the same as what we get out. """ - r = http.fetch(self.url, params={'fish%26chips': 'delicious'}) + r = self.fetch(self.url, params={'fish%26chips': 'delicious'}) fail_status = HTTPStatus.SERVICE_UNAVAILABLE if r.status_code == fail_status: # T203637 - self.skipTest('{status.value}: {status.description} for {url}' - .format(status=fail_status, url=self.url)) + self.skipTest(f'{fail_status.value}: {fail_status.description} ' + f'for {self.url}') self.assertEqual(r.status_code, HTTPStatus.OK) self.assertEqual(r.json()['args'], {'fish%26chips': 'delicious'}) -- To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/914364 To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: Iddc503bceacc6d0684b86d35bf860782d2810d0f Gerrit-Change-Number: 914364 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: Xqt <i...@gno.de> Gerrit-Reviewer: jenkins-bot Gerrit-MessageType: merged
_______________________________________________ Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org