def test_正测_成功添加楼层节点_在门店下创建楼层(self, depend_nodeInfo): with allure.step('准备用例入参'): parentAreaCode = depend_nodeInfo["shopData"]["areaCode"] floorName = testdata.random_node_floorName() with allure.step('接口请求'): res_info = api.bns_node_addFloor( parentAreaCode=parentAreaCode, floorName=floorName, ) res_data = JsonHelper.parseJson_by_objectpath( res_info, "$.response_data.data") with allure.step('校验:接口响应信息'): with allure.step('校验:接口状态码'): actual_code = JsonHelper.parseJson_by_objectpath( res_info, "$.response_data.code") expect_code = 0 self.assert_actual_equal_expect("接口业务码", actual_code, expect_code) with allure.step('校验:关联业务'): utils.positive_check_node(api, res_data) with allure.step('清理用例'): pass
def test_反测_失败添加楼层节点_楼层节点下建楼层(self, depend_nodeInfo): with allure.step('准备用例入参'): parentAreaCode = depend_nodeInfo["floorData"]["areaCode"] floorName = testdata.random_node_floorName() with allure.step('接口请求'): res_info = api.bns_node_addFloor( parentAreaCode=parentAreaCode, floorName=floorName, ) with allure.step('校验:接口响应信息'): with allure.step('校验:接口状态码'): actual_code = JsonHelper.parseJson_by_objectpath( res_info, "$.response_data.code") actual_msg = JsonHelper.parseJson_by_objectpath( res_info, "$.response_data.message") expect_code = 5015 expect_msg = '区域类型不正确' self.assert_actual_equal_expect("接口业务码", actual_code, expect_code) self.assert_actual_equal_expect("接口响应信息", actual_msg, expect_msg) with allure.step('清理用例'): pass