test_memuid_list.py
801 Bytes
import unittest
from atdd.PcPost import PcPost
class Memuid(PcPost):
def setUp(self):
self.do_login(self.host, self.mobile, self.psw, self.domain)
# 员工列表接口
def test_memlist(self):
url = '/contact/Apicp/User/DepartmentMember'
data = {
}
result = self.PcPost(url, data)
print('接口地址:' + self.host + self.domain + url)
self.assertEqual('ok', result['errmsg'], msg=result['errmsg'])
list = result['result']['list']
memberList = []
for i in range(len(list)):
mem_Uid = result['result']['list'][i]['uid'].split()
memberList[len(memberList):len(memberList)] = mem_Uid
print(memberList)
return memberList
if __name__ == '__main__':
unittest.main()