def setUp(self): self.tst_server = RunPwFileServer() self.tst_server.start() time.sleep(2.0) (self.username, self.password, self.hostname, self.port) = self.tst_server.get_boto_values() self.con = self._get_good_con()
class BasicLaunchConfigTests(unittest.TestCase): def _get_good_con(self): region = RegionInfo(endpoint=self.hostname) con = boto.ec2.autoscale.AutoScaleConnection( aws_access_key_id=self.username, aws_secret_access_key=self.password, is_secure=False, port=self.port, debug=3, region=region) return con def setUp(self): self.tst_server = RunPwFileServer() self.tst_server.start() time.sleep(2.0) (self.username, self.password, self.hostname, self.port) = self.tst_server.get_boto_values() self.con = self._get_good_con() def tearDown(self): _TESTONLY_clear_registry() try: self.tst_server.end() except Exception, ex: pyhantom.util.log(logging.ERROR, str(ex), printstack=True)
class BasicLaunchConfigTests(unittest.TestCase): def _get_good_con(self): region = RegionInfo(endpoint=self.hostname) con = boto.ec2.autoscale.AutoScaleConnection(aws_access_key_id=self.username, aws_secret_access_key=self.password, is_secure=False, port=self.port, debug=3, region=region) return con def setUp(self): self.tst_server = RunPwFileServer() self.tst_server.start() time.sleep(2.0) (self.username, self.password, self.hostname, self.port) = self.tst_server.get_boto_values() self.con = self._get_good_con() def tearDown(self): _TESTONLY_clear_registry() try: self.tst_server.end() except Exception, ex: pyhantom.util.log(logging.ERROR, str(ex), printstack=True)