def create(self): TestKitTemplate.toolsKitCategory = Material_Management.KitTemplate( ).get_toolsKitCategoryId() TestKitTemplate.goodsId = Material_Management.KitTemplate( ).get_ToolsList() response = Material_Management.KitTemplate().create_ToolsKit( TestKitTemplate.goodsId, name=timeStamp, toolsKitCategory=TestKitTemplate.toolsKitCategory) TestKitTemplate.toolsId = Material_Management.KitTemplate( ).get_KitTemplateList(timeStamp)
def test_06(self, create): """生成企业 为空""" response = Material_Management.KitTemplate().create_ToolsKit( self.goodsId, manufacturerId=None, toolsKitCategory=self.toolsKitCategory) assert response['msg'] == '请选择生产企业'
def test_07(self, create): """商品数量 为空""" response = Material_Management.KitTemplate().create_ToolsKit( self.goodsId, goodsQuantity=None, skuCode=str(timeStamp + 1), toolsKitCategory=self.toolsKitCategory) assert response['msg'] == '参数异常,请刷新后重试'
def test_18(self, create): response = Material_Management.KitTemplate().delete_ToolsKit( self.toolsId) assert response['msg'] == '请求成功'
def test_17(self, create): """工具包ID 错误""" response = Material_Management.KitTemplate().edit_Price( "self.toolsId", 100) assert response['msg'] == '请求参数异常'
def test_16(self, create): """工具包 租用费为空""" response = Material_Management.KitTemplate().edit_Price( self.toolsId, None) assert response['msg'] == '请输入工具包租用费'
def test_15(self, create): """工具包ID为空""" response = Material_Management.KitTemplate().edit_Price(None, 10000) assert response['msg'] == '参数异常,请刷新后重试'
def test_14(self, create): """工具包名称为空""" response = Material_Management.KitTemplate().edit_ToolsKit( self.goodsId, self.toolsId, kitTemplateName=None) assert response['msg'] == '请填写工具包名称'
def test_13(self, create): """工具包类型为空""" response = Material_Management.KitTemplate().edit_ToolsKit( self.goodsId, self.toolsId, kitCategory=None) assert response['msg'] == '请选择工具包类型'
def test_12(self, create): """生产企业为空""" response = Material_Management.KitTemplate().edit_ToolsKit( self.goodsId, self.toolsId, manufacturerId=None) assert response['msg'] == '请选择生产企业'
def test_11(self, create): """工具包描述为空""" response = Material_Management.KitTemplate().edit_ToolsKit( self.goodsId, self.toolsId, remark=None) assert response['msg'] == '请填写工具包描述'
def test_08(self, create): """工具包ID为空""" response = Material_Management.KitTemplate().edit_ToolsKit( self.goodsId, None) assert response['msg'] == '参数异常,请刷新后重试'
def test_04(self, create): """原厂编码为空""" response = Material_Management.KitTemplate().create_ToolsKit( self.goodsId, skuCode=None, toolsKitCategory=self.toolsKitCategory) assert response['msg'] == '原厂编码不能为空'
def test_03(self, create): """工具包名字 为空""" response = Material_Management.KitTemplate().create_ToolsKit( self.toolsId, name=None, toolsKitCategory=self.toolsKitCategory) assert response['msg'] == '工具包名称不能为空'
def test_02(self): """商品ID 错误""" response = Material_Management.KitTemplate().create_ToolsKit('None') assert response['msg'] == '请求参数异常'
def test_01(self, create): """商品ID 为空""" response = Material_Management.KitTemplate().create_ToolsKit( None, toolsKitCategory=self.toolsKitCategory) assert response['msg'] == '参数异常,请刷新后重试'