def test_05delSupplierBeginningBalance(self): """删除客户期初应收余额""" import requests from lib.read_login import getToken url = 'http://glterp.taijierp.cn/system/SupplierBalance/getSupplierBeginningBalanceList' params = {'token': getToken(), 'sign': '123456'} r = requests.get(url, params) print(r.json()['data']['data'][0]['beginning_supplier_balance_id']) ee = str(r.json()['data']['data'][0]['beginning_supplier_balance_id']) print(ee, type(ee)) # print(r.text) from lib import readexceldata, case_log import logging import requests from lib.read_login import wanHeader data = readexceldata.get_test_data('delSupplierBeginningBalance', read_excel('system')) case_log.case_log(data) url = data['url'] # input_payload = eval(data['input_payload']) expire_result = int(data['expire_result']) payload = eval(data['input_payload']) print(payload, type(payload)) payload['beginning_supplier_balance_id'] = str(ee) input_payload = payload print(input_payload) r = requests.post(url, data=input_payload, headers=wanHeader()) logging.info("响应内容:%s" % r.text) result = r.json()['code'] self.assertEqual(result, expire_result)
def test_02getCostRecalculationList(self): """成本重算列表""" Test.get_model(self, 'getCostRecalculationList', read_excel('system'))
def test_02getCustomerBeginningBalanceList(self): """获取客户期初应收余额列表""" Test.get_model(self, 'getCustomerBeginningBalanceList', read_excel('system'))
def test_01downloadFileUrl(self): """获取客户期初应收余额下载模板地址""" Test.get_model(self, 'customerdownloadFileUrl', read_excel('system'))
def test_04addSupplierBeginningBalance(self): """新增厂家期初应收余额""" Test.post_model(self, 'addSupplierBeginningBalance', read_excel('system'))
def test_03getSupplierBeginningBalanceInfo(self): """获取厂家期初应收余额详情,故意错误""" Test.get_model(self, 'getSupplierBeginningBalanceInfo', read_excel('system'))
def test_02getSupplierBeginningBalanceList(self): """获取厂家期初应收余额列表""" Test.get_model(self, 'getSupplierBeginningBalanceList', read_excel('system'))
def test_01downloadFileUrl(self): """获取厂家期初应收余额下载模板地址""" Test.get_model(self, 'supplierdownloadFileUrl', read_excel('system'))