test_feedback_customer_enable.py
977 Bytes
import unittest
import urllib3
from commons.MySession import sy1
from commons.api.feedback_customer_enable import feedback_customer_enable
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
fce = feedback_customer_enable()
import commons.ConfigDB as db
class test_feedback_customer_enable(unittest.TestCase):
"返还人启用"
@classmethod
def setUpClass(cls):
pass
def setUp(self):
self.id = db.mysql_selectOne("SELECT * FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '2' ORDER BY `id` DESC LIMIT 1")[0]
print(self.id)
def test_feedback_customer_enable_01(self):
url = fce.url.replace("49",str(self.id))
re = sy1.post(url = url, headers = fce.header)
print(fce.url)
print(re.headers)
print(re.json())
self.assertTrue("操作成功" in str(re.json()))
@classmethod
def tearDownClass(cls):
pass
if __name__ == '__main__':
unittest.main()