[TEST-18] Add function to suppress cert warnings 99/3599/2
authorJerry Flood <jf9860@att.com>
Fri, 21 Apr 2017 20:32:33 +0000 (16:32 -0400)
committerJerry Flood <jf9860@att.com>
Fri, 21 Apr 2017 20:44:37 +0000 (16:44 -0400)
Change-Id: I089debc2d8b736316443a53375a15e4791bef9bd
Signed-off-by: Jerry Flood <jf9860@att.com>
eteutils/HTTPUtils.py

index 9df3611..bca6b61 100644 (file)
@@ -1,8 +1,13 @@
 import urllib
+from requests.packages import urllib3
 
 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.quote_plus(barestring) 
\ No newline at end of file
+        return urllib.quote_plus(barestring)
+
+    def disable_warnings(self):
+        """  Disable the cert warnings when creating sessions for A&AI API Calls """
+        urllib3.disable_warnings()
\ No newline at end of file