Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
a5382a9e
Commit
a5382a9e
authored
Oct 19, 2023
by
xiao-hesheng
Browse files
新增科室
parent
b95b6977
Changes
6
Hide whitespace changes
Inline
Side-by-side
air_case/a2_herp3_bs/c4_新增科室后查询科室ID.air/c4_新增科室后查询科室ID.py
View file @
a5382a9e
...
...
@@ -55,7 +55,7 @@ def add_select_dept():
ename2
=
commonFuc
().
analysis_json
(
'ename'
,
data
[
1
])
print
(
'deptid2'
,
deptid2
,
ename2
)
info
=
(
deptid2
,
ename2
)
titlename
=
(
'
科室id'
,
'科室名称
'
)
titlename
=
(
'
dept2_id'
,
'dept2_name
'
)
#将二级科室id写入文件中
FileUtils
().
w_info4
(
info
,
module
,
'科室信息'
,
titlename
)
else
:
...
...
air_case/a2_herp3_bs/c5_新增科室_特殊科室_三级库房.air/c5_新增科室_特殊科室_三级库房.py
0 → 100644
View file @
a5382a9e
# -*- encoding=utf8 -*-
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,c5_新增科室_特殊科室_三级库房,id2263,id2263-25,sit,on
主数据平台:c5_新增科室_特殊科室_三级库房
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
add_center_dept
():
"""
场景:c5_新增科室_特殊科室_三级库房
用例名称:c5_新增科室_特殊科室_三级库房
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#c5_新增科室_特殊科室_三级库房
branch_id
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
dept2_id
=
FileUtils
().
r_info
(
module
,
'科室信息'
)[
"dept2_id"
]
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"dept_insert_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload16"
,
branch_id
,
dept2_id
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
checkDict
=
commonFuc
().
get_business_data
(
module
,
'checkDict2'
)
commonFuc
().
check_result
(
checkDict
,
result
)
add_center_dept
()
air_case/a2_herp3_bs/c6_新增科室_不生成库房.air/c6_新增科室_不生成库房.py
0 → 100644
View file @
a5382a9e
# -*- encoding=utf8 -*-
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,c6_新增科室_不生成库房,id2263,id2263-26,sit,on
主数据平台:c6_新增科室_不生成库房
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
add_center_dept
():
"""
场景:c6_新增科室_不生成库房
用例名称:c6_新增科室_不生成库房
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#c6_新增科室_不生成库房
branch_id
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
dept2_id
=
FileUtils
().
r_info
(
module
,
'科室信息'
)[
"dept2_id"
]
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"dept_insert_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload17"
,
branch_id
,
dept2_id
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
checkDict
=
commonFuc
().
get_business_data
(
module
,
'checkDict2'
)
commonFuc
().
check_result
(
checkDict
,
result
)
add_center_dept
()
data/a2_herp3_bs/data
View file @
a5382a9e
...
...
@@ -105,7 +105,36 @@ json_headers2: {
"flag": "1",
"corpId": "h0347"
}
"payload16": {
"branchId": "院区id",
"branchId": "%s",
"pid": "科室id,002是003的上级科室",
"pid": "%s",
"cname": "",
"ename": "三级科室003",
"code": "003",
"address": "三级科室003",
"contactWay": "三级科室003",
"deptKind": 3,
"deptCate": 1,
"deptLevel": "3",
"flag": "1",
"corpId": "h0347"
}
"payload17": {
"branchId": "%s",
"pid": "%s",
"cname": "",
"ename": "四级科室004",
"code": "004",
"address": "四级科室004",
"contactWay": "四级科室004",
"deptKind": 4,
"deptCate": 1,
"deptLevel": "4",
"flag": "1",
"corpId": "h0347"
}
checkDict: {"code": 0,'msg': None,'data': True}
checkDict1: {
"code": 0,
...
...
data/a2_herp3_bs/message
View file @
a5382a9e
...
...
@@ -2,5 +2,5 @@
branch_id: h0347-2658
branch_name: 东土城路院区pOryX
科室信息:
科室
id: 8f3aed0a165c486a92721cccb4298abc
科室名称
: 二级科室002
dept2_
id: 8f3aed0a165c486a92721cccb4298abc
dept2_name
: 二级科室002
report/summary.html
View file @
a5382a9e
...
...
@@ -72,9 +72,9 @@
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/c
4
_新增科室
后查询科室ID
/log.html'
target=
'_blank'
>
c
4
_新增科室
后查询科室ID
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/c
6
_新增科室
_不生成库房
/log.html'
target=
'_blank'
>
c
6
_新增科室
_不生成库房
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.
69
</td>
<td
class=
"details-col-elapsed"
>
0.
734
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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