test_delete_job.py
833 Bytes
import unittest
from atdd.PcPost import PcPost
from tests.Staff_Management.MemberList.JobList.get_jobid import JobId
class DeleteJob(PcPost):
url = '/Contact/Apicp/Job/Delete'
def setUp(self):
self.do_login(self.host, self.mobile, self.psw, self.domain)
# 删除岗位
def test_deletejob(self):
IDjob = JobId()
IDjob.setUp()
jobId = IDjob.test_get_1jobid()
data = {
'jobId': jobId # 参数化
}
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()