test_feedback_customer_disable.py 1.21 KB
import unittest
import urllib3
from commons.MySession import heb
from commons.api.sy.feedback_customer_disable import feedback_customer_disable
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
fcd = feedback_customer_disable()
import commons.ConfigDB as db

"""
进门收费——返点管理——返还人管理——禁用返还人
"""
@unittest.skip
class test_feedback_customer_disable(unittest.TestCase):
    "哈尔滨——返还人管理——返还人禁用"
    @classmethod
    def setUpClass(cls):
        pass

    def setUp(self):
        self.ids = db.mysql_selectOne('''SELECT id FROM `dili_jmsf`.`feedback_customer` 
        WHERE `status` = '1' and market_id = '''+str(heb.user["heb_user01"]["firmId"])+'''
         ORDER BY `id` DESC LIMIT 1''')[0]
        # print("查询出返还人id", self.id)

    def test_feedback_customer_disable_01(self):
        "返还人禁用"
        url = fcd.url.replace("44", str(self.ids))
        re = heb.post(url=url, headers=fcd.header)
        # print(re.headers)
        # print(re.json())
        self.assertTrue("操作成功" in str(re.json()))

    @classmethod
    def tearDownClass(cls):
        pass

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