def test_queryRiskLabelsByCompany(self): time.sleep(5) r = queryRiskLabelsByCompany(companyId=www_company_id) loger.info(f'{www_company_id}公司的风险标签:{r["data"]}') risk_label = ['外包公司', '保险公司', '招聘公司'] for label in r['data']: assert_in(label, risk_label, '公司获取风险标签用例通过', te='foxtang')
def test_recruiter_members_admin(self): r = recruiter_members() loger.info(f'flag:{r},当前用户:{admin_user_id}') result = r.get('content', {}).get('data', {}).get('members', {}).get('result', []) assert_equal(1, len(result), '公司仅有管理员在开通招聘者', te='foxtang') userIds = [str(user_info.get('userId')) for user_info in result] assert_in(admin_user_id, userIds, '管理员在当前公司完成招聘者审核的员工里', '管理员不在当前公司完成招聘者审核的员工里', 'foxtang')
def test_talent_newTalent(self, b_login_app): time.sleep(1) r = talent_newTalent(userToken=b_login_app[0], positionId=positionId) assert_equal(True, bool(len(r['content']['result'])), "最新人才用例通过", te='foxtang') for talent in r['content']['result']: if bool(talent.get('portrait', False)): assert_in(expect_value=talent['portrait'].split(".")[-1], actual_value=self.portrait_format, success_message="最新人才的头像信息用例通过", te='foxtang')
def test_talent_collections(self, b_login_app): r = talent_collections(userToken=b_login_app[0]) assert_equal(True, bool(len(r['content']['result'])), "人才收藏用例通过", te='foxtang') for talent in r['content']['result']: if bool(talent.get('portrait', False)): portrait = json.loads(talent['portrait']) assert_in(portrait['url'].split(".")[-1], self.portrait_format, "人才收藏的头像信息用例通过", te='foxtang')
def test_recruiter_members_general_user_02(self, get_user_info): global general_userId_02, www_company_id, general_user_name general_userId_02, easy_company_id, www_company_id, general_user_name = get_user_info r = recruiter_members() loger.info( f'flag:{r},当前用户:{general_userId_02}, 当前用户name: {general_user_name}' ) result = r.get('content', {}).get('data', {}).get('members', {}).get('result', []) assert_equal(2, len(result), '当前公司有两个开通招聘者服务的成员', te='foxtang') userIds = [str(user_info.get('userId')) for user_info in result] assert_in(general_userId_02, userIds, '普通用户在当前公司完成招聘者审核的员工里', '普通用户不在当前公司完成招聘者审核的员工里', 'foxtang')
def test_talent_recTalent(self, b_login_app): r = talent_recTalent(userToken=b_login_app[0], positionId=positionId) loger.info(f'推荐的职位id:{positionId}') assert_equal(True, bool(len(r['content']['result'])), "推荐人才用例通过", te='foxtang') global resumeId resumeId = r['content']['result'][0]['resumeId'] for talent in r['content']['result']: if bool(talent.get('portrait', False)): assert_in(talent['portrait'].split(".")[-1], self.portrait_format, "推荐人才的头像信息用例通过", te='foxtang')
def test_multiChannel_filter(ip_port): r = multiChannel_filter(ip_port=ip_port) assert_in('特权职位', [ position_type['name'] for position_type in r['content']['data']['positionTypes'] ], "职位类型(特权职位)用例通过")
def test_get_all_position_category(ip_port): r = get_all_position_category(ip_port=ip_port) assert_in('开发|测试|运维类', [category['firstType'] for category in r['content']['rows']], "获取职位的全部分类用例通过")
def test_add_pay_colleague_false(self, get_add_colleague_user): '''add_managerId = admin_user_id''' r = addColleague(phone=get_add_colleague_user, managerId=managerId, accountType='PAY_PRIVILEGE') '''print(add_result)''' assert_equal(1, r.get('state'), '校验无特权账号剩余,添加同事接口返回状态通过', te='Anan') assert_in('errorCode', r.get('content').get('data').get('info'), '校验无特权账号剩余,添加同事为特权账号失败通过', te='Anan')
def test_get_attachment_resume(self, get_access_token): res = get_attachment_resume(access_token=get_access_token, resume_id=resume_id) assert_equal(200, res.status_code, f'获取附件简历信息请求成功', te='foxtang') assert_in(res.headers.get('Attachment-Suffix'), ['pdf', 'doc', 'docx'], '获取附件简历用例通过', f'获取附件简历{resume_id}用例失败', 'foxtang')
def test_interviewTemplate_del(b_login_app, ip_port): r = interviewTemplate_del(userToken=b_login_app[0], userId=b_login_app[1], ip_port=ip_port, templateId=templateId) assert_in(templateId, template_list, "删除面试信息用例通过")
def test_interviewTemplate_all(b_login_app, ip_port): r = interviewTemplate_all(userToken=b_login_app[0], userId=b_login_app[1], ip_port=ip_port) global template_list template_list = [t['id'] for t in r['content']] assert_in(templateId, template_list, "添加面试信息用例通过")
def test_query_all_company(ip_port): r = query_all_company(userToken=userToken, userId=userId, ip_port=ip_port) assert_in(423911, r['content'], '查询所有大公司ID列表用例通过')
def test_ice_breaking_html(): r = ice_breaking_html() assert_in("拉勾教育首购用户【1元抢好课】", r, "进入到1元购的界面", te='张红彦')