def add_paper(self, **kwargs): self.req_method = 'POST' self.req_url = '/gzlqb/scienceart/paper/add' self.req_body = kwargs self.req_cookies = { 'api_account_token': auth_util.get_gz_token('crm'), } result = self.x_request() assert_util.result_check(result) return result
def new_subject(self, **kwargs): self.req_method = 'POST' self.req_url = '/subject/newSubject' self.req_body = kwargs self.req_cookies = { 'api_account_token': auth_util.get_gz_token('crm'), } result = self.x_request() assert_util.result_check(result) return result
def enable_exam(self, exam_id): self.req_method = 'POST' self.req_url = '/gzlqb/scienceart/examination/enable' self.req_body = {"id": exam_id, "enable": 1} self.req_cookies = { 'api_account_token': auth_util.get_gz_token('crm'), } result = self.request(method=self.req_method, url=self.req_url, headers=self.req_headers, cookies=self.req_cookies, data=self.req_body) assert_util.result_check(result) return result
def new_knowpoint(self, name): self.req_method = 'POST' self.req_url = '/gzlqb/scienceart/exam/knowLedgePoint/insert' self.req_body = {'name': name} self.req_cookies = { 'api_account_token': auth_util.get_gz_token('crm'), } result = self.request(method=self.req_method, url=self.req_url, headers=self.req_headers, cookies=self.req_cookies, data=self.req_body) assert_util.result_check(result) return result
def enable_exam(self, **kwargs): self.req_method = 'POST' self.req_url = '/examination/enable' self.req_body = kwargs self.req_cookies = { 'api_account_token': auth_util.get_gz_token('crm'), } result = self.request(method=self.req_method, url=self.req_url, headers=self.req_headers, cookies=self.req_cookies, data=self.req_body) assert_util.result_check(result) return result