test_jobMode.py
1.14 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
import unittest
from atdd.PcPost import PcPost
class JobMode(PcPost):
url = '/Contact/Apicp/Setting/Update'
def setUp(self):
self.do_login(self.host, self.mobile, self.psw, self.domain)
# 岗位设置-开启手动填写
def test_input(self):
data = {
'jobMode': 'input' # 手动填写
}
result = self.PcPost(self.url, data)
print('接口地址:' + self.host + self.domain + self.url)
self.assertEqual('ok', result['errmsg'], msg=result['errmsg'])
requestId = result['requestId'] # 从返回结果中获取requestId值
print('手动requestId = ' + requestId)
return result
# 岗位设置-开启配置选择
def test_select(self):
data = {
'jobMode': 'select' # 配置选择
}
result = self.PcPost(self.url, data)
print('接口地址:' + self.host + self.domain + self.url)
self.assertEqual('ok', result['errmsg'], msg=result['errmsg'])
requestId = result['requestId']
print('选择requestId = ' + requestId)
return result
if __name__ == '__main__':
unittest.main()