test_feedback_customer_query.py 922 Bytes
import unittest
import urllib3
from commons.MySession import my,sy1
from commons.api.feedback_customer_query import feedback_customer_query
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
fcq = feedback_customer_query()

class test_feedback_customer_query(unittest.TestCase):
    "返还人列表查询"
    @classmethod
    def setUpClass(cls):
        pass

    def test_feedback_customer_query_01(self):
        print(fcq.url)
        body = fcq.body.replace("史芳", "孟莹").replace("2021-07-02 00:00:00","\
        2021-08-02 00:00:00").replace("2021-08-03 23:59:59", "2021-08-08 23:59:59")

        re = sy1.post(url = fcq.url, data = body.encode('utf-8'),headers = fcq.header)
        # print(re.headers)
        # print(re.json())
        self.assertTrue("孟莹" in str(re.json()))

    @classmethod
    def tearDownClass(cls):
        pass


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