def test_edc_visit_list(self, client): resp_json = http_req(client, url_for('edc.visit-list'), method='GET', payload={'project_id': project_id}) log.info(str(resp_json)) assert resp_json['code'] == 0
def test_edc_visit_delete(self, client): payload = {'visit_id': 2} resp_json = http_req(client, url_for('edc.visit-delete'), method='POST', payload=payload) log.info(str(resp_json)) assert resp_json['code'] == 0
def test_edc_visit_sort(self, client): payload = {'project_id': project_id, 'visit_ids': [1, 2, 3]} resp_json = http_req(client, url_for('edc.visit-sort'), method='POST', payload=payload) log.info(str(resp_json)) assert resp_json['code'] == 0
def test_edc_visit_update(self, client): payload = {'visit_id': 2, 'visit_name': 'v22', 'visit_number': 'V0202'} resp_json = http_req(client, url_for('edc.visit-update'), method='POST', payload=payload) log.info(str(resp_json)) assert resp_json['code'] == 0
def test_edc_form_copy(self, client): payload = {'visit_id': 1, 'form_ids': [1]} resp_json = http_req(client, url_for('edc.form-copy'), method='POST', payload=payload) log.info(str(resp_json)) assert resp_json['code'] == 0
def test_edc_form_list(self, client): payload = {'visit_id': 1} resp_json = http_req(client, url_for('edc.form-list'), method='GET', payload=payload) log.info(str(resp_json)) assert resp_json['code'] == 0
def test_edc_visit_add(self, client): payload = { "project_id": project_id, "visit_name": "v1", "visit_number": "V01" } resp_json = http_req(client, url_for('edc.visit-add'), method='POST', payload=payload) resp_json2 = http_req(client, url_for('edc.visit-add'), method='POST', payload={ 'project_id': project_id, 'visit_name': 'v2', 'visit_number': 'V02' }) log.info(str(resp_json) + str(resp_json2)) assert resp_json['code'] == 0 and resp_json2['code'] == 0
def test_edc_form_update(self, client): payload = { 'form_id': 2, 'form_name': '新表单2', 'form_remark': '新备注2', 'form_repeat': '是' } resp_json = http_req(client, url_for('edc.form-update'), method='POST', payload=payload) log.info(str(resp_json)) assert resp_json['code'] == 0
def test_edc_form_add(self, client): payload = { 'visit_id': 1, 'form_name': '表单1', 'form_remark': '备注1', 'form_repeat': '否' } payload2 = { 'visit_id': 1, 'form_name': '表单2', 'form_remark': '备注2', 'form_repeat': '否' } resp_json = http_req(client, url_for('edc.form-add'), method='POST', payload=payload) resp_json2 = http_req(client, url_for('edc.form-add'), method='POST', payload=payload2) log.info(str(resp_json) + str(resp_json2)) assert resp_json['code'] == 0 and resp_json2['code'] == 0