Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
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
邓莹莹
backend_auto
Commits
2629b0c6
Commit
2629b0c6
authored
Jul 09, 2021
by
林颖
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' of
http://git.wanmeizhensuo.com/dengyingying/backend_auto
into ly_dev
parents
ca5c338b
79afc43c
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
103 additions
and
56 deletions
+103
-56
web2_request.py
all_doctor_api/web2_request.py
+1
-1
web2_request.yaml
all_doctor_api/web2_request.yaml
+2
-1
web_request.py
all_doctor_api/web_request.py
+6
-2
web_request.yaml
all_doctor_api/web_request.yaml
+9
-0
host.yaml
host.yaml
+3
-3
base_request.py
in_common/base_request.py
+1
-1
login_session_function.py
login_session_function.py
+6
-43
path_setting.py
path_setting.py
+4
-0
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+1
-1
test_artemis_ad_packageorder_detail.py
...tor_case/web2_case/test_artemis_ad_packageorder_detail.py
+25
-0
test_artemis_order_list.py
test_doctor_case/web_case/test_artemis_order_list.py
+2
-0
test_conversation_coupon.py
test_doctor_case/web_case/test_conversation_coupon.py
+1
-1
test_cpc_community_homepage.py
test_doctor_case/web_case/test_cpc_community_homepage.py
+23
-0
artemis_ad_packageorder_detail.yaml
...doctor_data/web2_data/artemis_ad_packageorder_detail.yaml
+6
-0
artemis_order_list.yaml
test_doctor_data/web_data/artemis_order_list.yaml
+2
-1
conversation_coupon.yaml
test_doctor_data/web_data/conversation_coupon.yaml
+1
-1
conversation_user_id.yaml
test_doctor_data/web_data/conversation_user_id.yaml
+1
-1
cpc_community_homepage.yaml
test_doctor_data/web_data/cpc_community_homepage.yaml
+9
-0
No files found.
all_doctor_api/web2_request.py
View file @
2629b0c6
...
...
@@ -71,5 +71,5 @@ if __name__ == '__main__':
print
(
web2_request
()
.
artemis_ad_add_shopping_cart_info
())
print
(
web2_request
()
.
artemis_add_value_order_id_detail
())
print
(
"---11233353667----"
)
#
print(web2_request().artemis_ad_packageorder_detail("685529883901"))
print
(
web2_request
()
.
artemis_ad_packageorder_detail
(
"685529883901"
))
all_doctor_api/web2_request.yaml
View file @
2629b0c6
...
...
@@ -86,7 +86,7 @@ artemis_ad_packageorder_detail:
method
:
get
url
:
/api/web2/artemis/ad/packageorder/detail
params
:
package_order_id:${package_order_id}
package_order_id
:
${package_order_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
all_doctor_api/web_request.py
View file @
2629b0c6
...
...
@@ -72,6 +72,9 @@ class web_request(BaseRequest):
def
artemis_order_id_detail
(
self
):
"上线中订单详情页"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_order_id_detail"
])
def
cpc_community_homepage
(
self
):
"点点通-内容-概览"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_homepage"
])
...
...
@@ -96,4 +99,5 @@ if __name__ == '__main__':
print
(
web_request
()
.
artemis_order_list
(
0
,
1
))
print
(
web_request
()
.
artemis_order_list
(
1
,
1
))
print
(
web_request
()
.
artemis_order_list
(
2
,
1
))
print
(
web_request
()
.
artemis_order_id_detail
())
\ No newline at end of file
print
(
web_request
()
.
artemis_order_id_detail
())
print
(
web_request
()
.
cpc_community_homepage
())
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
2629b0c6
...
...
@@ -153,4 +153,12 @@ artemis_order_id_detail:
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_community_homepage
:
method
:
get
url
:
/api/web/cpc_community/homepage
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
host.yaml
View file @
2629b0c6
develop_host
:
backend
:
http://backend.paas-develop.env
#
om: http://om.paas-develop.env
#
doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
om
:
http://om.paas-develop.env
doctor
:
http://doctor.paas-develop.env
# backend
_online
: https://backend.igengmei.com
in_common/base_request.py
View file @
2629b0c6
...
...
@@ -59,7 +59,7 @@ class BaseRequest:
s
=
requests
if
req
.
get
(
'isLogin'
):
s
=
LoginFunction
()
.
get_session
()
s
=
LoginFunction
()
.
get_session
(
host_service
)
# 调用具体case的url
r
=
s
.
request
(
...
...
login_session_function.py
View file @
2629b0c6
...
...
@@ -15,56 +15,20 @@ class LoginFunction:
with
open
(
path
,
encoding
=
'utf-8'
)
as
f
:
return
yaml
.
safe_load
(
f
)
def
get_session
(
self
):
hostList
=
self
.
host
[
'develop_host'
]
for
key
in
hostList
:
if
'backend'
==
key
:
return
self
.
get_develop_session
()
if
'doctor'
==
key
:
return
self
.
get_doctor_session
()
elif
'om'
==
key
:
return
self
.
get_om_session
()
def
get_develop_session
(
self
):
url
=
self
.
host
[
"develop_host"
][
"backend"
]
+
self
.
params
[
"backend_login"
][
"url"
]
def
get_session
(
self
,
host_service
):
project_login
=
host_service
+
"_login"
url
=
self
.
host
[
"develop_host"
][
host_service
]
+
self
.
params
[
project_login
][
"url"
]
s
=
requests
.
session
()
r
=
s
.
request
(
self
.
params
[
"backend_login"
][
"method"
],
self
.
params
[
project_login
][
"method"
],
url
=
url
,
params
=
self
.
params
[
"backend_login"
][
"params"
],
data
=
self
.
params
[
"backend_login"
][
"data"
],
params
=
self
.
params
[
project_login
][
"params"
],
data
=
self
.
params
[
project_login
][
"data"
],
headers
=
{
'Connection'
:
'close'
},
# verify=False
)
return
s
def
get_doctor_session
(
self
):
url
=
self
.
host
[
"develop_host"
][
"doctor"
]
+
self
.
params
[
"doctor_login"
][
"url"
]
s
=
requests
.
session
()
r
=
s
.
request
(
self
.
params
[
"doctor_login"
][
"method"
],
url
=
url
,
params
=
self
.
params
[
"doctor_login"
][
"params"
],
data
=
self
.
params
[
"doctor_login"
][
"data"
],
headers
=
{
'Connection'
:
'close'
}
)
return
s
def
get_om_session
(
self
):
url
=
self
.
host
[
"develop_host"
][
"om"
]
+
self
.
params
[
"om_login"
][
"url"
]
s
=
requests
.
session
()
r
=
s
.
request
(
self
.
params
[
"om_login"
][
"method"
],
url
=
url
,
params
=
self
.
params
[
"om_login"
][
"params"
],
data
=
self
.
params
[
"om_login"
][
"data"
],
headers
=
{
'Connection'
:
'close'
}
)
return
s
if
__name__
==
'__main__'
:
LoginFunction
()
.
get_session
()
\ No newline at end of file
path_setting.py
View file @
2629b0c6
...
...
@@ -431,8 +431,12 @@ ORDERLIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "arte
ORDERIDDETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"artemis_order_id_detail.yaml"
)
#医生后台-我的服务订单-已购买订单
VALUEORDERIDDETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_add_value_order_id_detail.yaml"
)
#医生后台-我的服务订单-已购买广告包
ADPACKAGEORDERDETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_ad_packageorder_detail.yaml"
)
#医生后台-点点通商品-概览
CPCHOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_homepage.yaml"
)
#医生后台-点点通内容-概览
CPCCOMMUNITYHOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_homepage.yaml"
)
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"visual_beauty_card.yaml"
)
...
...
test_backend_data/topic_data/topic_reply_create.yaml
View file @
2629b0c6
...
...
@@ -3,7 +3,7 @@ reply_create:
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
content
:
ces测试+2021-06-2
3 11:41:50
content
:
ces测试+2021-06-2
8 16:25:25
message
:
请勿回复重复内容
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
...
...
test_doctor_case/web2_case/test_artemis_ad_packageorder_detail.py
0 → 100644
View file @
2629b0c6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web2_request
import
web2_request
class
TestArtemisAdPackageorderDetail
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ADPACKAGEORDERDETAIL
)
adpackageorderdetail_case
,
adpackageorderdetail_data
=
get_ids
(
data
,
"artemis_ad_packageorder_detail"
)
@pytest.mark.parametrize
(
"param"
,
adpackageorderdetail_data
,
ids
=
adpackageorderdetail_case
)
def
test_artemis_ad_packageorder_detail
(
self
,
param
):
'''我的服务订单-已支付广告包'''
r
=
web2_request
()
.
artemis_ad_packageorder_detail
(
param
[
"package_order_id"
])
print
(
r
)
if
r
[
"error"
]
==
0
:
advertise_source
=
r
.
get
(
"data"
)
.
get
(
"info"
)
.
get
(
"advertise_source"
,
[])
#ExtendValue["info"] = json.loads(ExtendValue["info"])
assert
len
(
advertise_source
)
>
param
[
"assert"
]
test_doctor_case/web_case/test_artemis_order_list.py
View file @
2629b0c6
...
...
@@ -18,4 +18,6 @@ class TestArtemisOrderList:
if
r
[
"error"
]
==
0
:
orders
=
r
.
get
(
"data"
)
.
get
(
"orders"
,
[])
assert
len
(
orders
)
>=
param
[
"assert"
]
if
r
[
"error"
]
==
300002
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
test_doctor_case/web_case/test_conversation_coupon.py
View file @
2629b0c6
...
...
@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest
from
all_doctor_api.web_request
import
web_request
class
Test
Service
:
class
Test
ConversationCoupon
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATIONCOUPON
)
conversationcoupon_case
,
conversationcoupon_data
=
get_ids
(
data
,
"conversation_coupon"
)
...
...
test_doctor_case/web_case/test_cpc_community_homepage.py
0 → 100644
View file @
2629b0c6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestCpcCommunityHomepage
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCOMMUNITYHOMEPAGE
)
cpccommunityhomepage_case
,
cpccommunityhomepage_data
=
get_ids
(
data
,
"cpc_community_homepage"
)
@pytest.mark.parametrize
(
"param"
,
cpccommunityhomepage_data
,
ids
=
cpccommunityhomepage_case
)
def
test_cpc_community_homepage
(
self
,
param
):
'''点点通-概览'''
r
=
web_request
()
.
cpc_community_homepage
()
if
r
[
"error"
]
==
0
:
if
r
[
"data"
][
"account"
]
<=
"0"
:
assert
r
[
"data"
][
"is_cpc"
]
==
param
[
"assert"
]
else
:
assert
r
[
"data"
][
"is_cpc"
]
==
param
[
"assert1"
]
test_doctor_data/web2_data/artemis_ad_packageorder_detail.yaml
0 → 100644
View file @
2629b0c6
artemis_ad_packageorder_detail
:
#我的服务订单-已支付广告包
-
case
:
"
我的服务订单-已支付广告包"
package_order_id
:
"
685529883901"
assert
:
0
test_doctor_data/web_data/artemis_order_list.yaml
View file @
2629b0c6
artemis_order_list
:
#我的服务订单case
-
case
:
"
我的服务订单
请求失败
case"
case
:
"
我的服务订单
参数错误
case"
status
:
"
"
page
:
1
assert
:
0
assert_message
:
"
错误参数:
status"
-
case
:
"
我的服务订单-待支付广告包case"
status
:
0
...
...
test_doctor_data/web_data/conversation_coupon.yaml
View file @
2629b0c6
...
...
@@ -5,7 +5,7 @@ conversation_coupon:
doctor_user_id
:
"
602329"
assert
:
0
-
case
:
"
点击私信发送优惠券按钮
接口报错
"
case
:
"
点击私信发送优惠券按钮
缺少参数case
"
doctor_user_id
:
"
602329"
assert
:
0
assert_message
:
'
缺少参数:
doctor_user_id'
...
...
test_doctor_data/web_data/conversation_user_id.yaml
View file @
2629b0c6
...
...
@@ -10,7 +10,7 @@ conversation_user_id:
assert_message
:
"
消息发送成功"
assert_name
:
"
露露2"
-
case
:
"
发送失败
"
-
case
:
"
权限校验case:没有权限
"
type
:
0
content
:
您好
doctor_user_id
:
6023291
...
...
test_doctor_data/web_data/cpc_community_homepage.yaml
0 → 100644
View file @
2629b0c6
cpc_community_homepage
:
#点点通内容-概览case
-
case
:
"
点点通内容概览"
#doctor_user_id: "602329"
assert
:
False
assert_account
:
0
assert1
:
True
\ No newline at end of file
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