def setUp(self): self.config = ConfigParser() self.config.read('rpcs/rpc.cfg') vista = RpcService() vista.site_id = self.config.get('My Test Vista', 'site_id') vista.hostname = self.config.get('My Test Vista', 'hostname') vista.port = int(self.config.get('My Test Vista', 'port')) vista.source_type = self.config.get('My Test Vista', 'source_type') self.cxn = vista.get_cxn()
def setUp(self): my_path = os.path.dirname(os.path.abspath(__file__)) cfg_path = os.path.abspath(os.path.join(my_path, "../rpc.cfg")) config = ConfigParser() config.read(cfg_path) vista = RpcService() vista.site_id = config.get("My Test Vista", "site_id") vista.hostname = config.get("My Test Vista", "hostname") vista.port = int(config.get("My Test Vista", "port")) vista.source_type = config.get("My Test Vista", "source_type") self.cxn = vista.get_cxn()