test_fc_edit.py 895 Bytes
import unittest
import urllib3
from commons.MySession import my,sy1
from commons.api.fc_edit import fc_edit
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)


fc=fc_edit()
class test_fc_edit(unittest.TestCase):
    "修改返还人"
    @classmethod
    def setUpClass(cls):
        # my.post(url=fc.url, headers=fc.header, data=fc.body.encode('utf-8'))
        pass

    def test_fc_edit_01(self):

        body = fc.body.replace("relationalCard[0].cardNumber=210720131533",\
                               "relationalCard[0].cardNumber=210720125142")
        # print(body)
        re = sy1.post(url=fc.url, headers=fc.header, data=body.encode('utf-8'))
        # print(re.headers)
        # print(re.json())
        self.assertTrue("操作成功" in str(re.json()))

    @classmethod
    def tearDownClass(cls):
        pass


if __name__ == '__main__':
    unittest.main()