def get_request_data(self, clear_interface_data): '''获取当前case的数据''' data_config = DataConfig(clear_interface_data) self.clear_url = data_config.get_url() self.clear_method = data_config.get_method() self.clear_header = data_config.get_header() self.clear_post_action = data_config.get_post_action() self.clear_post_params = data_config.get_post_params() self.depend_case_id = data_config.get_depend_case_id()
def post_act(self): ''' 数据清理操作 :return: ''' dc = DataConfig(self.data) self.post_action = dc.get_post_action() self.post_params = dc.get_post_params() if self.post_action or self.depend_case_id: post_act_obj = PostAct(self.post_action,self.post_params,self.depend_case_id,self.url) post_act_obj.handle_post_action()
def get_field(self): dc = DataConfig(self.data) self.case_id = dc.get_case_id() self.url = dc.get_url() self.method = dc.get_method() self.is_write = dc.is_write() self.is_run = dc.get_is_run() self.has_cookie = dc.has_cookie() self.header = dc.get_header() self.request_param = dc.get_param() self.request_data = dc.get_data() self.request_file = dc.get_file() self.depend_case_id = dc.get_depend_case_id() self.expect = dc.get_expect_for_db() self.post_action = dc.get_post_action() self.post_params = dc.get_post_params()
def get_field(self, depend_case_id): ''' 获取依赖接口的字段 :return: ''' self.line_data = self.get_line_data(depend_case_id) data_config = DataConfig(self.line_data) self.url = data_config.get_url() self.method = data_config.get_method() self.has_cookie = data_config.has_cookie() self.header = data_config.get_header() self.request_param = data_config.get_param() self.request_data = data_config.get_data() self.request_file = data_config.get_file() self.depend_case_id = data_config.get_depend_case_id() self.post_action = data_config.get_post_action() self.post_params = data_config.get_post_params()