Commit 6f872985f4f0cbe1f8a08668fa57b9b7d3ad539b
1 parent
d0853aca
调整文件结构
Showing
8 changed files
with
77 additions
and
0 deletions
atdd/__pycache__/PcPost.cpython-36.pyc
No preview for this file type
tests/Staff_Management/MemberList/test_delete_mem.py
0 → 100644
tests/Staff-Management/MemberList/test_detail_mem.py renamed to tests/Staff_Management/MemberList/test_detail_mem.py
tests/Staff-Management/MemberList/test_memlist_mem.py renamed to tests/Staff_Management/MemberList/test_memlist_mem.py
tests/Staff_Management/MemberList/test_memuid_list.py
0 → 100644
1 | +import unittest | |
2 | +from atdd.PcPost import PcPost | |
3 | + | |
4 | + | |
5 | +class Memuid(PcPost): | |
6 | + def setUp(self): | |
7 | + self.do_login(self.host, self.mobile, self.psw, self.domain) | |
8 | + | |
9 | + # 员工列表接口 | |
10 | + def test_memlist(self): | |
11 | + url = '/contact/Apicp/User/DepartmentMember' | |
12 | + data = { | |
13 | + } | |
14 | + result = self.PcPost(url, data) | |
15 | + print('接口地址:' + self.host + self.domain + url) | |
16 | + self.assertEqual('ok', result['errmsg'], msg=result['errmsg']) | |
17 | + list = result['result']['list'] | |
18 | + memberList = [] | |
19 | + for i in range(len(list)): | |
20 | + mem_Uid = result['result']['list'][i]['uid'].split() | |
21 | + memberList[len(memberList):len(memberList)] = mem_Uid | |
22 | + print(memberList) | |
23 | + return memberList | |
24 | + | |
25 | +if __name__ == '__main__': | |
26 | + unittest.main() | ... | ... |
tests/Staff_Management/MemberList/test_roleId_jobid.py
0 → 100644
1 | +import unittest | |
2 | +from atdd.PcPost import PcPost | |
3 | + | |
4 | + | |
5 | +class RoleId(PcPost): | |
6 | + def setUp(self): | |
7 | + self.do_login(self.host, self.mobile, self.psw, self.domain) | |
8 | + | |
9 | + # 获取角色列表 | |
10 | + def test_get_roleid(self): | |
11 | + url = '/Contact/Apicp/Role/List' | |
12 | + data = { | |
13 | + } | |
14 | + result = self.PcPost(url, data) | |
15 | + print('接口地址: ' + self.host + self.domain + url) | |
16 | + list = result['result']['list'] | |
17 | + roleidlist = [] | |
18 | + for i in range(len(list)): | |
19 | + roleId = result['result']['list'][i]['roleId'].split() | |
20 | + roleidlist[len(roleidlist):len(roleidlist)] = roleId | |
21 | + print(roleidlist) | |
22 | + return roleidlist | |
23 | + | |
24 | + # 获取岗位列表 | |
25 | + def test_get_jobid(self): | |
26 | + url = '/Contact/Apicp/Job/List' | |
27 | + data = { | |
28 | + } | |
29 | + result = self.PcPost(url, data) | |
30 | + resultlist = result['result']['list'] | |
31 | + jobIdlist = [] | |
32 | + for i in range(len(resultlist)): | |
33 | + jobId = result['result']['list'][i][jobId].split() | |
34 | + | |
35 | + | |
36 | +if __name__ == '__main__': | |
37 | + unittest.main() | ... | ... |
tests/Staff-Management/MemberList/test_save_mem.py renamed to tests/Staff_Management/MemberList/test_save_mem.py
tests/Staff-Management/MemberList/test_search_mem.py renamed to tests/Staff_Management/MemberList/test_search_mem.py