Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jk_interface_test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huangqiang
jk_interface_test
Commits
31d2f8e5
Commit
31d2f8e5
authored
Apr 30, 2021
by
lanjiali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校区费用预警-查询
parent
afbc1bd1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
184 additions
and
90 deletions
+184
-90
workspace.xml
.idea/workspace.xml
+12
-4
run.py
run.py
+1
-1
test_demo.py
script/ji_yun_ying_pc/lanjiali_report/test_demo.py
+46
-52
test_school_expense.py
script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py
+125
-33
No files found.
.idea/workspace.xml
View file @
31d2f8e5
...
...
@@ -19,10 +19,10 @@
<select
/>
</component>
<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$/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"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -255,7 +255,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1619611092963
</updated>
</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
/>
</component>
<component
name=
"Vcs.Log.Tabs.Properties"
>
...
...
@@ -279,7 +286,8 @@
<MESSAGE
value=
"学生费用预警查询-学生信息对比"
/>
<MESSAGE
value=
"校区费用预警查询"
/>
<MESSAGE
value=
"学生费用预警查询-分页"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"学生费用预警查询-分页"
/>
<MESSAGE
value=
"校区费用预警-查询"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"校区费用预警-查询"
/>
</component>
<component
name=
"XDebuggerManager"
>
<breakpoint-manager>
...
...
run.py
View file @
31d2f8e5
...
...
@@ -3,7 +3,7 @@ import os
if
__name__
==
'__main__'
:
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"
,
"--host"
,
"http://192.168.32.31"
,
"--account"
,
"b"
,
...
...
script/ji_yun_ying_pc/lanjiali_report/test_demo.py
View file @
31d2f8e5
...
...
@@ -17,8 +17,8 @@ import pytest
@allure.feature
(
"预警报表-学员费用预警查询"
)
class
Test_select_student_expense
:
@allure.story
(
"学生费用预警查询"
)
@allure.
step
(
"学生费用预警查询-关键字筛选"
)
@allure.story
(
"学生费用预警查询
-关键字查询
"
)
@allure.
title
(
"学生费用预警查询-关键字筛选"
)
@pytest.mark.parametrize
(
"keyword"
,
keywords
)
def
test_keywords_search
(
self
,
keyword
):
keyword_value
=
keyword
.
get
(
"keyword"
)
...
...
@@ -49,10 +49,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_equal_value
(
studentphone_list
,
keyword_value
)
pytest
.
assume
(
result
)
@allure.step
(
"学生费用预警查询-年份筛选"
)
@allure.story
(
"学生费用预警查询-年份筛选"
)
@pytest.mark.parametrize
(
"year"
,[
select_year
()])
@allure.step
(
"学生费用预警查询-年份筛选"
)
def
test_year_screen
(
self
,
year
):
data
=
{
"pageNum"
:
1
,
...
...
@@ -68,10 +66,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_equal_value
(
years
,
year
)
pytest
.
assume
(
result
)
@allure.step
(
'学生费用预警-期段筛选'
)
@allure.story
(
'学生费用预警-期段筛选'
)
@pytest.mark.parametrize
(
"term"
,[
select_term
()])
@allure.step
(
"学生费用预警查询-期段筛选"
)
def
test_period_screen
(
self
,
term
):
data
=
{
"pageNum"
:
1
,
...
...
@@ -87,10 +83,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_equal_value
(
terms
,
term
)
pytest
.
assume
(
result
)
@allure.step
(
"学生费用预警-学生状态筛选"
)
@allure.story
(
"学生费用预警-学生状态筛选"
)
@pytest.mark.parametrize
(
"statuses"
,
student_statuses
)
@allure.step
(
"学生费用预警查询-学生状态筛选"
)
def
test_student_status
(
self
,
statuses
):
status_value
=
statuses
[
'status'
]
status_meaning
=
statuses
[
'meaning'
]
...
...
@@ -118,9 +112,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_in_list
(
student_status
,
status_value
)
pytest
.
assume
(
result
)
@allure.st
ep
(
'学生费用预警-年级筛选'
)
@allure.st
ory
(
'学生费用预警-年级筛选'
)
@pytest.mark.parametrize
(
"grade"
,
grades
)
@allure.step
(
"学生费用预警查询-年级筛选"
)
def
test_select_grade
(
self
,
grade
):
data
=
{
"pageNum"
:
1
,
...
...
@@ -146,9 +139,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_equal_value
(
grade_list
,
'4年级'
)
pytest
.
assume
(
result
)
@allure.
step
(
'学生费用预警-学科筛选'
)
@allure.
title
(
'学生费用预警-学科筛选'
)
@pytest.mark.parametrize
(
"subject"
,
subjects
)
@allure.step
(
"学生费用预警查询-学科筛选"
)
def
test_select_subject
(
self
,
subject
):
data
=
{
"pageNum"
:
1
,
...
...
@@ -178,9 +170,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_equal_value
(
subject_list
,
subject
)
pytest
.
assume
(
result
)
@allure.st
ep
(
"学生费用预警-班型筛选"
)
@allure.st
ory
(
"学生费用预警-班型筛选"
)
@pytest.mark.parametrize
(
"class_types"
,
classTypes
)
@allure.step
(
"学生费用预警查询-班型筛选"
)
def
test_select_classTypes
(
self
,
class_types
):
class_types_value
=
class_types
[
'classType'
]
classtype_name
=
class_types
[
'classType_name'
]
...
...
@@ -214,8 +205,7 @@ class Test_select_student_expense:
pytest
.
assume
(
result
)
@allure.step
(
"学生费用预警-组合筛选"
)
@allure.step
(
"学生费用预警查询-组合筛选"
)
@allure.story
(
"学生费用预警-组合筛选"
)
def
test_select_all
(
self
):
data
=
{
"pageSize"
:
10
,
...
...
@@ -230,37 +220,41 @@ class Test_select_student_expense:
"schoolAreaIds"
:
school_areas
}
res
=
report_finance_student_expense_warning_post
(
header
=
jyy_header
,
body
=
data
)
#校验名字
studentName_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..studentName"
)
keyword_res
=
public_asserts
.
assert_res_field_contain_value
(
studentName_list
,
'蓝'
)
pytest
.
assume
(
keyword_res
)
#校验学生状态
studentStatuse_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..studentStatus"
)
statue_res
=
public_asserts
.
assert_res_field_in_list
(
studentStatuse_list
,[
1110
])
pytest
.
assume
(
statue_res
)
#校验年份
year_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..year"
)
year_res
=
public_asserts
.
assert_res_field_equal_value
(
year_list
,
'2021'
)
pytest
.
assume
(
year_res
)
#校验期段
term_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..term"
)
term_res
=
public_asserts
.
assert_res_field_in_list
(
term_list
,
[
'春'
])
pytest
.
assume
(
term_res
)
#校验学科
subjects_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..subject"
)
subjects_res
=
public_asserts
.
assert_res_field_equal_value
(
subjects_list
,
'数学'
)
pytest
.
assume
(
subjects_res
)
#校验年级
grade_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..grade"
)
grade_res
=
public_asserts
.
assert_res_field_equal_value
(
grade_list
,
'3年级'
)
pytest
.
assume
(
grade_res
)
# 校验班型
classType_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..classType"
)
classType_res
=
public_asserts
.
assert_res_field_equal_value
(
classType_list
,
'极趣班'
)
pytest
.
assume
(
classType_res
)
@allure.step
(
"学生费用预警-列表数据汇总"
)
if
res
[
'data'
][
'list'
]
==
[]:
assert
res
[
'msg'
]
==
'成功'
assert
res
[
'code'
]
==
0
else
:
#校验名字
studentName_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..studentName"
)
keyword_res
=
public_asserts
.
assert_res_field_contain_value
(
studentName_list
,
'蓝'
)
pytest
.
assume
(
keyword_res
)
#校验学生状态
studentStatuse_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..studentStatus"
)
statue_res
=
public_asserts
.
assert_res_field_in_list
(
studentStatuse_list
,[
1110
])
pytest
.
assume
(
statue_res
)
#校验年份
year_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..year"
)
year_res
=
public_asserts
.
assert_res_field_equal_value
(
year_list
,
'2021'
)
pytest
.
assume
(
year_res
)
#校验期段
term_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..term"
)
term_res
=
public_asserts
.
assert_res_field_in_list
(
term_list
,
[
'春'
])
pytest
.
assume
(
term_res
)
#校验学科
subjects_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..subject"
)
subjects_res
=
public_asserts
.
assert_res_field_equal_value
(
subjects_list
,
'数学'
)
pytest
.
assume
(
subjects_res
)
#校验年级
grade_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..grade"
)
grade_res
=
public_asserts
.
assert_res_field_equal_value
(
grade_list
,
'3年级'
)
pytest
.
assume
(
grade_res
)
# 校验班型
classType_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..classType"
)
classType_res
=
public_asserts
.
assert_res_field_equal_value
(
classType_list
,
'极趣班'
)
pytest
.
assume
(
classType_res
)
@allure.story
(
"学生费用预警-列表数据汇总"
)
def
test_studentExtend_total
(
self
):
data
=
{
...
...
@@ -356,7 +350,7 @@ class Test_select_student_expense:
assert
round
(
total_remainAmount
[
0
],
2
)
==
sum_remainAmount
@allure.st
ep
(
"学生费用预警-查看学生信息"
)
@allure.st
ory
(
"学生费用预警-查看学生信息"
)
def
test_select_stuinfo
(
self
):
data
=
{
"pageNum"
:
1
,
...
...
@@ -378,7 +372,7 @@ class Test_select_student_expense:
student_name
=
student_res
[
'data'
][
'studentName'
]
assert
studentname_list
[
0
]
==
student_name
@allure.st
ep
(
"学生费用预警-分页
"
)
@allure.st
ory
(
"学生费用预警-分页判断
"
)
def
test_page
(
self
):
data
=
{
"pageNum"
:
1
,
...
...
script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py
View file @
31d2f8e5
...
...
@@ -12,9 +12,10 @@ from script.default_header import jyy_header
@allure.feature
(
"预警报表-校区费用预警查询"
)
class
Test_select_school_expense_warning
():
@allure.st
ep
(
"校区费用预警-按年份筛选"
)
@allure.st
ory
(
"校区费用预警-按年份筛选"
)
@pytest.mark.parametrize
(
"year"
,[
select_year
()])
def
test_select_year
(
self
,
year
):
print
(
year
)
data
=
{
"pageNum"
:
1
,
"pageSize"
:
10
,
...
...
@@ -24,10 +25,11 @@ class Test_select_school_expense_warning():
"groups"
:
[
"school_area_id"
]
}
res
=
report_finance_school_expense_warning_post
(
header
=
jyy_header
,
body
=
data
)
print
(
res
)
assert
res
[
'msg'
]
==
'成功'
assert
res
[
'code'
]
==
0
@allure.st
ep
(
"校区费用预警-按期段筛选"
)
@allure.st
ory
(
"校区费用预警-按期段筛选"
)
@pytest.mark.parametrize
(
"term"
,[
select_term
()])
def
test_select_term
(
self
,
term
):
data
=
{
...
...
@@ -42,16 +44,24 @@ class Test_select_school_expense_warning():
assert
res
[
'msg'
]
==
'成功'
assert
res
[
'code'
]
==
0
@allure.step
(
"校区费用预警-组合筛选"
)
def
test_select_all
(
self
):
@allure.story
(
"校区费用预警-组合筛选"
)
@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
=
{
"pageNum"
:
1
,
"pageSize"
:
10
,
"year"
:
2021
,
"term"
:
"春"
,
"subjects"
:
[
"数学"
],
"grades"
:
[
"三年级"
],
"classTypes"
:
[
"极趣班"
],
"year"
:
year
,
"term"
:
term
,
"subjects"
:
[
subject
],
"grades"
:
[
grade
],
"classTypes"
:
[
classtype
],
"schoolAreaIds"
:
school_areas
,
"groups"
:
[
"school_area_id"
]
}
...
...
@@ -59,74 +69,156 @@ class Test_select_school_expense_warning():
assert
res
[
'msg'
]
==
'成功'
assert
res
[
'code'
]
==
0
@allure.step
(
"校区费用预警-汇总数据校验"
)
def
test_schoolExtend_total
(
self
):
@allure.title
(
"校区费用预警-汇总数据校验"
)
@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
=
{
"pageNum"
:
1
,
"pageSize"
:
10
,
"year"
:
select_year
()
,
"term"
:
select_term
()
,
"subjects"
:
[
"数学"
],
"grades"
:
[
"三年级"
],
"classTypes"
:
[
"极趣班"
],
"year"
:
year
,
"term"
:
term
,
"subjects"
:
[
subject
],
"grades"
:
[
grade
],
"classTypes"
:
[
classtype
],
"schoolAreaIds"
:
school_areas
,
"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
=
{
"pageNum"
:
1
,
"pageSize"
:
10000
,
"year"
:
select_year
()
,
"term"
:
select_term
()
,
"subjects"
:
[
"数学"
],
"grades"
:
[
"三年级"
],
"classTypes"
:
[
"极趣班"
],
"year"
:
year
,
"term"
:
term
,
"subjects"
:
[
subject
],
"grades"
:
[
grade
],
"classTypes"
:
[
classtype
],
"schoolAreaIds"
:
school_areas
,
"studentStatuses"
:
[
1110
,
1140
,
1150
,
1120
,
1130
,
1160
]
}
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
(
schoolex
tend
_res
[
'data'
][
'extend'
][
'prepaidNum'
],
2
)
school_prepaidNum_total
=
round
(
schoolex
pense
_res
[
'data'
][
'extend'
][
'prepaidNum'
],
2
)
student_prepaidNum_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'prepaidNum'
],
2
)
assert
school_prepaidNum_total
==
student_prepaidNum_total
print
(
school_prepaidNum_total
)
#校区汇总的预收课程净额
school_prepaidAmount_total
=
round
(
schoolex
tend
_res
[
'data'
][
'extend'
][
'prepaidAmount'
],
2
)
school_prepaidAmount_total
=
round
(
schoolex
pense
_res
[
'data'
][
'extend'
][
'prepaidAmount'
],
2
)
student_prepaidAmount_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'prepaidAmount'
],
2
)
assert
school_prepaidAmount_total
==
student_prepaidAmount_total
print
(
school_prepaidAmount_total
)
#校区汇总的课消课时数
school_attendanceNum_total
=
round
(
schoolex
tend
_res
[
'data'
][
'extend'
][
'attendanceNum'
],
2
)
school_attendanceNum_total
=
round
(
schoolex
pense
_res
[
'data'
][
'extend'
][
'attendanceNum'
],
2
)
student_attendanceNum_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'attendanceNum'
],
2
)
assert
school_attendanceNum_total
==
student_attendanceNum_total
print
(
school_attendanceNum_total
)
#校区汇总的溢价
school_premium_total
=
round
(
schoolex
tend
_res
[
'data'
][
'extend'
][
'premium'
],
2
)
school_premium_total
=
round
(
schoolex
pense
_res
[
'data'
][
'extend'
][
'premium'
],
2
)
student_premium_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'premium'
],
2
)
print
(
school_premium_total
)
assert
school_premium_total
==
student_premium_total
#校区汇总的其他抵扣
school_otherDeduction_total
=
round
(
schoolex
tend
_res
[
'data'
][
'extend'
][
'otherDeduction'
],
2
)
school_otherDeduction_total
=
round
(
schoolex
pense
_res
[
'data'
][
'extend'
][
'otherDeduction'
],
2
)
student_otherDeduction_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'otherDeduction'
],
2
)
print
(
school_otherDeduction_total
)
assert
school_otherDeduction_total
==
student_otherDeduction_total
#校区差异调整汇总 imbalanceAmount
school_imbalanceAmount_total
=
round
(
schoolex
tend
_res
[
'data'
][
'extend'
][
'imbalanceAmount'
],
2
)
school_imbalanceAmount_total
=
round
(
schoolex
pense
_res
[
'data'
][
'extend'
][
'imbalanceAmount'
],
2
)
student_imbalanceAmount_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'imbalanceAmount'
],
2
)
assert
school_imbalanceAmount_total
==
student_imbalanceAmount_total
print
(
school_imbalanceAmount_total
)
else
:
assert
schoolextend_res
[
'msg'
]
==
'成功'
assert
schoolextend_res
[
'code'
]
==
0
assert
schoolexpense_res
[
'msg'
]
==
'成功'
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
],
"极趣班"
)]
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment