test_feedback_customer_enable.py
1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import unittest
import urllib3
from commons.MySession import sy1
from commons.api.sy.feedback_customer_enable import feedback_customer_enable
from commons.api.sy.feedback_customer_disable import feedback_customer_disable
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
fce = feedback_customer_enable()
fcd = feedback_customer_disable
import commons.ConfigDB as db
"""
进门收费——返点管理——返还人管理——启用返还人
"""
class test_feedback_customer_enable(unittest.TestCase):
"沈阳——返还人管理——返还人启用"
@classmethod
def setUpClass(cls):
pass
def setUp(self):
self.ids = db.mysql_selectOne('''
SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '2' and
market_id='''+str(sy1.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0]
print(self.ids)
def test_feedback_customer_enable_01(self):
"返还人启用"
url = fce.url.replace("49",str(self.ids))
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()