From: kaihlavi Date: Thu, 6 Jun 2019 08:08:57 +0000 (+0300) Subject: Improve URL encoding X-Git-Tag: 6.0.0-ONAP~63 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F89485%2F2;p=testsuite%2Fpython-testing-utils.git Improve URL encoding Change URL encoding to apply percent-encoding also to spaces (which are currently converted to plus characters) Corrected also too specific disable_warnings method documentation Issue-ID: TEST-162 Signed-off-by: kaihlavi Change-Id: Iac253533905755955236e72e292cff2e49180034 --- diff --git a/robotframework-onap/eteutils/HTTPUtils.py b/robotframework-onap/eteutils/HTTPUtils.py index c24ebf4..f5c8fe4 100644 --- a/robotframework-onap/eteutils/HTTPUtils.py +++ b/robotframework-onap/eteutils/HTTPUtils.py @@ -8,11 +8,11 @@ class HTTPUtils: """HTTPUtils is common resource for simple http helper keywords.""" def url_encode_string(self, barestring): - """URL Encode String takes in a string and converts into 'percent-encoded' string""" - return urllib.parse.quote_plus(barestring) + """URL Encode String takes in a string and converts it into fully 'percent-encoded' string""" + return urllib.parse.quote(barestring) def disable_warnings(self): - """ Disable the cert warnings when creating sessions for A&AI API Calls """ + """ Disable all warnings when creating sessions """ urllib3.disable_warnings() def url_parse(self, url):