Beispiel #1
0
 def setUp(self):
   # disable stdout
   out = StringIO.StringIO()
   sys.stdout = out
   # Create config
   self.config = AmbariConfig()
   # Instantiate CachedHTTPSConnection (skip connect() call)
   with patch.object(security.VerifiedHTTPSConnection, "connect"):
     self.cachedHTTPSConnection = security.CachedHTTPSConnection(self.config)
Beispiel #2
0
 def setUp(self):
   # disable stdout
   out = StringIO.StringIO()
   sys.stdout = out
   # Create config
   self.config = AmbariConfig()
   self.config.set('security', 'ssl_verify_cert', '0')
   # Instantiate CachedHTTPSConnection (skip connect() call)
   with patch.object(security.VerifiedHTTPSConnection, "connect"):
     self.cachedHTTPSConnection = security.CachedHTTPSConnection(self.config, "example.com")