Commit 31d2f8e5 authored by lanjiali's avatar lanjiali

校区费用预警-查询

parent afbc1bd1
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
<select /> <select />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="54f4d37d-1724-4813-a1e2-24e200088c5f" name="Default Changelist" comment="学生费用预警查询-分页"> <list default="true" id="54f4d37d-1724-4813-a1e2-24e200088c5f" name="Default Changelist" comment="校区费用预警-查询">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/run.py" beforeDir="false" afterPath="$PROJECT_DIR$/run.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/run.py" beforeDir="false" afterPath="$PROJECT_DIR$/run.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/data_config/report_config.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/data_config/report_config.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_demo.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_demo.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -255,7 +255,14 @@ ...@@ -255,7 +255,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1619611092963</updated> <updated>1619611092963</updated>
</task> </task>
<option name="localTasksCounter" value="10" /> <task id="LOCAL-00010" summary="校区费用预警-查询">
<created>1619697582572</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1619697582572</updated>
</task>
<option name="localTasksCounter" value="11" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.Tabs.Properties"> <component name="Vcs.Log.Tabs.Properties">
...@@ -279,7 +286,8 @@ ...@@ -279,7 +286,8 @@
<MESSAGE value="学生费用预警查询-学生信息对比" /> <MESSAGE value="学生费用预警查询-学生信息对比" />
<MESSAGE value="校区费用预警查询" /> <MESSAGE value="校区费用预警查询" />
<MESSAGE value="学生费用预警查询-分页" /> <MESSAGE value="学生费用预警查询-分页" />
<option name="LAST_COMMIT_MESSAGE" value="学生费用预警查询-分页" /> <MESSAGE value="校区费用预警-查询" />
<option name="LAST_COMMIT_MESSAGE" value="校区费用预警-查询" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
......
...@@ -3,7 +3,7 @@ import os ...@@ -3,7 +3,7 @@ import os
if __name__ == '__main__': if __name__ == '__main__':
run_config = [ run_config = [
"-s", "./script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py::Test_select_school_expense_warning::test_schoolExtend_total", "-s", "./script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py",
"--alluredir", "./report/xml", "--alluredir", "./report/xml",
"--host", "http://192.168.32.31", "--host", "http://192.168.32.31",
"--account", "b", "--account", "b",
......
...@@ -17,8 +17,8 @@ import pytest ...@@ -17,8 +17,8 @@ import pytest
@allure.feature("预警报表-学员费用预警查询") @allure.feature("预警报表-学员费用预警查询")
class Test_select_student_expense: class Test_select_student_expense:
@allure.story("学生费用预警查询") @allure.story("学生费用预警查询-关键字查询")
@allure.step("学生费用预警查询-关键字筛选") @allure.title("学生费用预警查询-关键字筛选")
@pytest.mark.parametrize("keyword", keywords) @pytest.mark.parametrize("keyword", keywords)
def test_keywords_search(self,keyword): def test_keywords_search(self,keyword):
keyword_value = keyword.get("keyword") keyword_value = keyword.get("keyword")
...@@ -49,10 +49,8 @@ class Test_select_student_expense: ...@@ -49,10 +49,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_equal_value(studentphone_list,keyword_value) result = public_asserts.assert_res_field_equal_value(studentphone_list,keyword_value)
pytest.assume(result) pytest.assume(result)
@allure.story("学生费用预警查询-年份筛选")
@allure.step("学生费用预警查询-年份筛选")
@pytest.mark.parametrize("year",[select_year()]) @pytest.mark.parametrize("year",[select_year()])
@allure.step("学生费用预警查询-年份筛选")
def test_year_screen(self,year): def test_year_screen(self,year):
data = { data = {
"pageNum": 1, "pageNum": 1,
...@@ -68,10 +66,8 @@ class Test_select_student_expense: ...@@ -68,10 +66,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_equal_value(years,year) result = public_asserts.assert_res_field_equal_value(years,year)
pytest.assume(result) pytest.assume(result)
@allure.story('学生费用预警-期段筛选')
@allure.step('学生费用预警-期段筛选')
@pytest.mark.parametrize( "term",[select_term()]) @pytest.mark.parametrize( "term",[select_term()])
@allure.step("学生费用预警查询-期段筛选")
def test_period_screen(self,term): def test_period_screen(self,term):
data = { data = {
"pageNum": 1, "pageNum": 1,
...@@ -87,10 +83,8 @@ class Test_select_student_expense: ...@@ -87,10 +83,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_equal_value(terms,term) result = public_asserts.assert_res_field_equal_value(terms,term)
pytest.assume(result) pytest.assume(result)
@allure.story("学生费用预警-学生状态筛选")
@allure.step("学生费用预警-学生状态筛选")
@pytest.mark.parametrize("statuses",student_statuses) @pytest.mark.parametrize("statuses",student_statuses)
@allure.step("学生费用预警查询-学生状态筛选")
def test_student_status(self,statuses): def test_student_status(self,statuses):
status_value = statuses['status'] status_value = statuses['status']
status_meaning = statuses['meaning'] status_meaning = statuses['meaning']
...@@ -118,9 +112,8 @@ class Test_select_student_expense: ...@@ -118,9 +112,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_in_list(student_status, status_value) result = public_asserts.assert_res_field_in_list(student_status, status_value)
pytest.assume(result) pytest.assume(result)
@allure.step('学生费用预警-年级筛选') @allure.story('学生费用预警-年级筛选')
@pytest.mark.parametrize("grade",grades) @pytest.mark.parametrize("grade",grades)
@allure.step("学生费用预警查询-年级筛选")
def test_select_grade(self,grade): def test_select_grade(self,grade):
data = { data = {
"pageNum": 1, "pageNum": 1,
...@@ -146,9 +139,8 @@ class Test_select_student_expense: ...@@ -146,9 +139,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_equal_value(grade_list,'4年级') result = public_asserts.assert_res_field_equal_value(grade_list,'4年级')
pytest.assume(result) pytest.assume(result)
@allure.step('学生费用预警-学科筛选') @allure.title('学生费用预警-学科筛选')
@pytest.mark.parametrize("subject", subjects) @pytest.mark.parametrize("subject", subjects)
@allure.step("学生费用预警查询-学科筛选")
def test_select_subject(self,subject): def test_select_subject(self,subject):
data = { data = {
"pageNum": 1, "pageNum": 1,
...@@ -178,9 +170,8 @@ class Test_select_student_expense: ...@@ -178,9 +170,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_equal_value(subject_list,subject) result = public_asserts.assert_res_field_equal_value(subject_list,subject)
pytest.assume(result) pytest.assume(result)
@allure.step("学生费用预警-班型筛选") @allure.story("学生费用预警-班型筛选")
@pytest.mark.parametrize("class_types",classTypes) @pytest.mark.parametrize("class_types",classTypes)
@allure.step("学生费用预警查询-班型筛选")
def test_select_classTypes(self,class_types): def test_select_classTypes(self,class_types):
class_types_value = class_types['classType'] class_types_value = class_types['classType']
classtype_name = class_types['classType_name'] classtype_name = class_types['classType_name']
...@@ -214,8 +205,7 @@ class Test_select_student_expense: ...@@ -214,8 +205,7 @@ class Test_select_student_expense:
pytest.assume(result) pytest.assume(result)
@allure.step("学生费用预警-组合筛选") @allure.story("学生费用预警-组合筛选")
@allure.step("学生费用预警查询-组合筛选")
def test_select_all(self): def test_select_all(self):
data = { data = {
"pageSize": 10, "pageSize": 10,
...@@ -230,37 +220,41 @@ class Test_select_student_expense: ...@@ -230,37 +220,41 @@ class Test_select_student_expense:
"schoolAreaIds": school_areas "schoolAreaIds": school_areas
} }
res = report_finance_student_expense_warning_post(header= jyy_header,body= data) res = report_finance_student_expense_warning_post(header= jyy_header,body= data)
#校验名字 if res['data']['list'] == []:
studentName_list = jsonpath.jsonpath(res,"$.data.list..studentName") assert res['msg'] == '成功'
keyword_res = public_asserts.assert_res_field_contain_value(studentName_list,'蓝') assert res['code'] == 0
pytest.assume(keyword_res) else:
#校验学生状态 #校验名字
studentStatuse_list = jsonpath.jsonpath(res,"$.data.list..studentStatus") studentName_list = jsonpath.jsonpath(res,"$.data.list..studentName")
statue_res = public_asserts.assert_res_field_in_list(studentStatuse_list,[1110]) keyword_res = public_asserts.assert_res_field_contain_value(studentName_list,'蓝')
pytest.assume(statue_res) pytest.assume(keyword_res)
#校验年份 #校验学生状态
year_list = jsonpath.jsonpath(res,"$.data.list..year") studentStatuse_list = jsonpath.jsonpath(res,"$.data.list..studentStatus")
year_res = public_asserts.assert_res_field_equal_value(year_list,'2021') statue_res = public_asserts.assert_res_field_in_list(studentStatuse_list,[1110])
pytest.assume(year_res) pytest.assume(statue_res)
#校验期段 #校验年份
term_list = jsonpath.jsonpath(res, "$.data.list..term") year_list = jsonpath.jsonpath(res,"$.data.list..year")
term_res = public_asserts.assert_res_field_in_list(term_list, ['春']) year_res = public_asserts.assert_res_field_equal_value(year_list,'2021')
pytest.assume(term_res) pytest.assume(year_res)
#校验学科 #校验期段
subjects_list = jsonpath.jsonpath(res, "$.data.list..subject") term_list = jsonpath.jsonpath(res, "$.data.list..term")
subjects_res = public_asserts.assert_res_field_equal_value(subjects_list, '数学') term_res = public_asserts.assert_res_field_in_list(term_list, ['春'])
pytest.assume(subjects_res) pytest.assume(term_res)
#校验年级 #校验学科
grade_list = jsonpath.jsonpath(res, "$.data.list..grade") subjects_list = jsonpath.jsonpath(res, "$.data.list..subject")
grade_res = public_asserts.assert_res_field_equal_value(grade_list, '3年级') subjects_res = public_asserts.assert_res_field_equal_value(subjects_list, '数学')
pytest.assume(grade_res) pytest.assume(subjects_res)
# 校验班型 #校验年级
classType_list = jsonpath.jsonpath(res, "$.data.list..classType") grade_list = jsonpath.jsonpath(res, "$.data.list..grade")
classType_res = public_asserts.assert_res_field_equal_value(classType_list, '极趣班') grade_res = public_asserts.assert_res_field_equal_value(grade_list, '3年级')
pytest.assume(classType_res) pytest.assume(grade_res)
# 校验班型
classType_list = jsonpath.jsonpath(res, "$.data.list..classType")
@allure.step("学生费用预警-列表数据汇总") classType_res = public_asserts.assert_res_field_equal_value(classType_list, '极趣班')
pytest.assume(classType_res)
@allure.story("学生费用预警-列表数据汇总")
def test_studentExtend_total(self): def test_studentExtend_total(self):
data = { data = {
...@@ -356,7 +350,7 @@ class Test_select_student_expense: ...@@ -356,7 +350,7 @@ class Test_select_student_expense:
assert round(total_remainAmount[0], 2) == sum_remainAmount assert round(total_remainAmount[0], 2) == sum_remainAmount
@allure.step("学生费用预警-查看学生信息") @allure.story("学生费用预警-查看学生信息")
def test_select_stuinfo(self): def test_select_stuinfo(self):
data = { data = {
"pageNum": 1, "pageNum": 1,
...@@ -378,7 +372,7 @@ class Test_select_student_expense: ...@@ -378,7 +372,7 @@ class Test_select_student_expense:
student_name = student_res['data']['studentName'] student_name = student_res['data']['studentName']
assert studentname_list[0] == student_name assert studentname_list[0] == student_name
@allure.step("学生费用预警-分页") @allure.story("学生费用预警-分页判断")
def test_page(self): def test_page(self):
data = { data = {
"pageNum": 1, "pageNum": 1,
......
...@@ -12,9 +12,10 @@ from script.default_header import jyy_header ...@@ -12,9 +12,10 @@ from script.default_header import jyy_header
@allure.feature("预警报表-校区费用预警查询") @allure.feature("预警报表-校区费用预警查询")
class Test_select_school_expense_warning(): class Test_select_school_expense_warning():
@allure.step("校区费用预警-按年份筛选") @allure.story("校区费用预警-按年份筛选")
@pytest.mark.parametrize("year",[select_year()]) @pytest.mark.parametrize("year",[select_year()])
def test_select_year(self,year): def test_select_year(self,year):
print(year)
data = { data = {
"pageNum": 1, "pageNum": 1,
"pageSize": 10, "pageSize": 10,
...@@ -24,10 +25,11 @@ class Test_select_school_expense_warning(): ...@@ -24,10 +25,11 @@ class Test_select_school_expense_warning():
"groups": ["school_area_id"] "groups": ["school_area_id"]
} }
res = report_finance_school_expense_warning_post(header=jyy_header,body=data) res = report_finance_school_expense_warning_post(header=jyy_header,body=data)
print(res)
assert res['msg'] == '成功' assert res['msg'] == '成功'
assert res['code'] == 0 assert res['code'] == 0
@allure.step("校区费用预警-按期段筛选") @allure.story("校区费用预警-按期段筛选")
@pytest.mark.parametrize("term",[select_term()]) @pytest.mark.parametrize("term",[select_term()])
def test_select_term(self,term): def test_select_term(self,term):
data = { data = {
...@@ -42,16 +44,24 @@ class Test_select_school_expense_warning(): ...@@ -42,16 +44,24 @@ class Test_select_school_expense_warning():
assert res['msg'] == '成功' assert res['msg'] == '成功'
assert res['code'] == 0 assert res['code'] == 0
@allure.step("校区费用预警-组合筛选") @allure.story("校区费用预警-组合筛选")
def test_select_all(self): @pytest.mark.parametrize(
'year,term,grade,subject,classtype',
[
(
select_year(),select_term(),grades[2],subjects[3],'极趣班'
)
]
)
def test_select_all(self,year,term,grade,subject,classtype):
data = { data = {
"pageNum": 1, "pageNum": 1,
"pageSize": 10, "pageSize": 10,
"year": 2021, "year": year,
"term": "春", "term": term,
"subjects": ["数学"], "subjects": [subject],
"grades": ["三年级"], "grades": [grade],
"classTypes": ["极趣班"], "classTypes": [classtype],
"schoolAreaIds": school_areas, "schoolAreaIds": school_areas,
"groups": ["school_area_id"] "groups": ["school_area_id"]
} }
...@@ -59,74 +69,156 @@ class Test_select_school_expense_warning(): ...@@ -59,74 +69,156 @@ class Test_select_school_expense_warning():
assert res['msg'] == '成功' assert res['msg'] == '成功'
assert res['code'] == 0 assert res['code'] == 0
@allure.step("校区费用预警-汇总数据校验") @allure.title("校区费用预警-汇总数据校验")
def test_schoolExtend_total(self): @pytest.mark.parametrize(
"year,term,subject,grade,classtype",
[(
select_year(),select_term(),subjects[4],grades[2],"数学"
)]
)
def test_schoolExtend_total(self,year,term,subject,grade,classtype):
data = { data = {
"pageNum": 1, "pageNum": 1,
"pageSize": 10, "pageSize": 10,
"year": select_year(), "year": year,
"term": select_term(), "term": term,
"subjects": ["数学"], "subjects": [subject],
"grades": ["三年级"], "grades": [grade],
"classTypes": ["极趣班"], "classTypes": [classtype],
"schoolAreaIds": school_areas, "schoolAreaIds": school_areas,
"groups": ["school_area_id"] "groups": ["school_area_id"]
} }
schoolextend_res = report_finance_school_expense_warning_post(header=jyy_header,body=data) schoolexpense_res = report_finance_school_expense_warning_post(header=jyy_header,body=data)
#获取学生费用预警汇总数据 #获取学生费用预警汇总数据
student_expense_data = { student_expense_data = {
"pageNum": 1, "pageNum": 1,
"pageSize": 10000, "pageSize": 10000,
"year": select_year(), "year": year,
"term": select_term(), "term": term,
"subjects": ["数学"], "subjects": [subject],
"grades": ["三年级"], "grades": [grade],
"classTypes": ["极趣班"], "classTypes": [classtype],
"schoolAreaIds": school_areas, "schoolAreaIds": school_areas,
"studentStatuses": [1110, 1140, 1150, 1120, 1130, 1160] "studentStatuses": [1110, 1140, 1150, 1120, 1130, 1160]
} }
studentexpense_res = report_finance_student_expense_warning_post(header=jyy_header,body=student_expense_data) studentexpense_res = report_finance_student_expense_warning_post(header=jyy_header,body=student_expense_data)
if schoolextend_res['data']['list'] != '': if schoolexpense_res['data']['list'] != []:
#校区汇总的预收课时总数与学生预收课时总数判断 #校区汇总的预收课时总数与学生预收课时总数判断
school_prepaidNum_total = round(schoolextend_res['data']['extend']['prepaidNum'],2) school_prepaidNum_total = round(schoolexpense_res['data']['extend']['prepaidNum'],2)
student_prepaidNum_total = round(studentexpense_res['data']['extend']['prepaidNum'], 2) student_prepaidNum_total = round(studentexpense_res['data']['extend']['prepaidNum'], 2)
assert school_prepaidNum_total == student_prepaidNum_total assert school_prepaidNum_total == student_prepaidNum_total
print(school_prepaidNum_total) print(school_prepaidNum_total)
#校区汇总的预收课程净额 #校区汇总的预收课程净额
school_prepaidAmount_total = round(schoolextend_res['data']['extend']['prepaidAmount'],2) school_prepaidAmount_total = round(schoolexpense_res['data']['extend']['prepaidAmount'],2)
student_prepaidAmount_total = round(studentexpense_res['data']['extend']['prepaidAmount'], 2) student_prepaidAmount_total = round(studentexpense_res['data']['extend']['prepaidAmount'], 2)
assert school_prepaidAmount_total == student_prepaidAmount_total assert school_prepaidAmount_total == student_prepaidAmount_total
print(school_prepaidAmount_total) print(school_prepaidAmount_total)
#校区汇总的课消课时数 #校区汇总的课消课时数
school_attendanceNum_total = round(schoolextend_res['data']['extend']['attendanceNum'],2) school_attendanceNum_total = round(schoolexpense_res['data']['extend']['attendanceNum'],2)
student_attendanceNum_total = round(studentexpense_res['data']['extend']['attendanceNum'], 2) student_attendanceNum_total = round(studentexpense_res['data']['extend']['attendanceNum'], 2)
assert school_attendanceNum_total == student_attendanceNum_total assert school_attendanceNum_total == student_attendanceNum_total
print(school_attendanceNum_total) print(school_attendanceNum_total)
#校区汇总的溢价 #校区汇总的溢价
school_premium_total = round(schoolextend_res['data']['extend']['premium'],2) school_premium_total = round(schoolexpense_res['data']['extend']['premium'],2)
student_premium_total = round(studentexpense_res['data']['extend']['premium'], 2) student_premium_total = round(studentexpense_res['data']['extend']['premium'], 2)
print(school_premium_total) print(school_premium_total)
assert school_premium_total == student_premium_total assert school_premium_total == student_premium_total
#校区汇总的其他抵扣 #校区汇总的其他抵扣
school_otherDeduction_total = round(schoolextend_res['data']['extend']['otherDeduction'],2) school_otherDeduction_total = round(schoolexpense_res['data']['extend']['otherDeduction'],2)
student_otherDeduction_total = round(studentexpense_res['data']['extend']['otherDeduction'], 2) student_otherDeduction_total = round(studentexpense_res['data']['extend']['otherDeduction'], 2)
print(school_otherDeduction_total) print(school_otherDeduction_total)
assert school_otherDeduction_total == student_otherDeduction_total assert school_otherDeduction_total == student_otherDeduction_total
#校区差异调整汇总 imbalanceAmount #校区差异调整汇总 imbalanceAmount
school_imbalanceAmount_total = round(schoolextend_res['data']['extend']['imbalanceAmount'],2) school_imbalanceAmount_total = round(schoolexpense_res['data']['extend']['imbalanceAmount'],2)
student_imbalanceAmount_total = round(studentexpense_res['data']['extend']['imbalanceAmount'], 2) student_imbalanceAmount_total = round(studentexpense_res['data']['extend']['imbalanceAmount'], 2)
assert school_imbalanceAmount_total == student_imbalanceAmount_total assert school_imbalanceAmount_total == student_imbalanceAmount_total
print(school_imbalanceAmount_total) print(school_imbalanceAmount_total)
else: else:
assert schoolextend_res['msg'] == '成功' assert schoolexpense_res['msg'] == '成功'
assert schoolextend_res['code'] == 0 assert schoolexpense_res['code'] == 0
@allure.story("校区费用预警-不同校区的列表数据正确")
@pytest.mark.parametrize(
#[2389]:成都金沙中心校 [3063]:创意山中心校
"year,term,subject,grade,classtype,schoolarea",
[
(select_year(), select_term(), subjects[3], grades[2], "极趣班",[2389]),
(select_year(), select_term(), subjects[3], grades[2], "极趣班", [3063])
]
)
def test_diffient_schoolexpense_total(self,year,term,subject,grade,classtype,schoolarea):
print(grade,subject)
schoolexpense_data = {
"pageNum": 1,
"pageSize": 10,
"year": year,
"term": term,
"subjects": [subject],
"grades": [grade],
"classTypes": [classtype],
"schoolAreaIds": schoolarea,
"groups": ["school_area_id"]
}
schoolexpense_res = report_finance_school_expense_warning_post(header=jyy_header,body=schoolexpense_data)
#获取对应校区学生的费用预警总额
studentexpense_data = {
"pageNum": 1,
"pageSize": 10000,
"year": year,
"term": term,
"subjects": [subject],
"grades": [grade],
"classTypes": [classtype],
"schoolAreaIds": schoolarea,
"studentStatuses": [1110, 1140, 1150, 1120, 1130, 1160]
}
studentexpense_res = report_finance_student_expense_warning_post(header=jyy_header,body=studentexpense_data)
if schoolexpense_res['data']['list'] == []:
assert schoolexpense_res['code'] == 0
assert schoolexpense_res['msg'] == '成功'
else:
# 校区汇总的预收课时总数与学生预收课时总数判断
school_prepaidNum_total = round(schoolexpense_res['data']['extend']['prepaidNum'], 2)
student_prepaidNum_total = round(studentexpense_res['data']['extend']['prepaidNum'], 2)
assert school_prepaidNum_total == student_prepaidNum_total
# 校区汇总的预收课程净额
school_prepaidAmount_total = round(schoolexpense_res['data']['extend']['prepaidAmount'], 2)
student_prepaidAmount_total = round(studentexpense_res['data']['extend']['prepaidAmount'], 2)
assert school_prepaidAmount_total == student_prepaidAmount_total
# 校区汇总的课消课时数
school_attendanceNum_total = round(schoolexpense_res['data']['extend']['attendanceNum'], 2)
student_attendanceNum_total = round(studentexpense_res['data']['extend']['attendanceNum'], 2)
assert school_attendanceNum_total == student_attendanceNum_total
# 校区汇总的溢价
school_premium_total = round(schoolexpense_res['data']['extend']['premium'], 2)
student_premium_total = round(studentexpense_res['data']['extend']['premium'], 2)
assert school_premium_total == student_premium_total
# 校区汇总的其他抵扣
school_otherDeduction_total = round(schoolexpense_res['data']['extend']['otherDeduction'], 2)
student_otherDeduction_total = round(studentexpense_res['data']['extend']['otherDeduction'], 2)
assert school_otherDeduction_total == student_otherDeduction_total
# 校区差异调整汇总 imbalanceAmount
school_imbalanceAmount_total = round(schoolexpense_res['data']['extend']['imbalanceAmount'], 2)
student_imbalanceAmount_total = round(studentexpense_res['data']['extend']['imbalanceAmount'], 2)
assert school_imbalanceAmount_total == student_imbalanceAmount_total
@allure.story("校区费用预警-分页")
@pytest.mark.parametrize(
"year,term,subject,grade,classtype",
[(select_year(), select_term(), subjects[3], grades[2],"极趣班")]
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment