test_roleId_jobid.py 1.04 KB
import unittest
from atdd.PcPost import PcPost


class RoleId(PcPost):
    def setUp(self):
        self.do_login(self.host, self.mobile, self.psw, self.domain)

    # 获取角色列表
    def test_get_roleid(self):
        url = '/Contact/Apicp/Role/List'
        data = {
        }
        result = self.PcPost(url, data)
        print('接口地址: ' + self.host + self.domain + url)
        list = result['result']['list']
        roleidlist = []
        for i in range(len(list)):
            roleId = result['result']['list'][i]['roleId'].split()
            roleidlist[len(roleidlist):len(roleidlist)] = roleId
        print(roleidlist)
        return roleidlist

    # 获取岗位列表
    def test_get_jobid(self):
        url = '/Contact/Apicp/Job/List'
        data = {
        }
        result = self.PcPost(url, data)
        resultlist = result['result']['list']
        jobIdlist = []
        for i in range(len(resultlist)):
            jobId = result['result']['list'][i][jobId].split()


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