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
e60b035a
Commit
e60b035a
authored
Aug 23, 2021
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
om登录
parent
43eb1e73
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
178 additions
and
4 deletions
+178
-4
achelous_request.py
all_om_api/achelous_request.py
+9
-2
achelous_request.yaml
all_om_api/achelous_request.yaml
+12
-2
path_setting.py
path_setting.py
+2
-0
test_account_login.py
test_om_case/achelous_case/test_account_login.py
+21
-0
account_login.yaml
test_om_data/achelous_data/account_login.yaml
+134
-0
No files found.
all_om_api/achelous_request.py
View file @
e60b035a
...
@@ -65,8 +65,15 @@ class achelous_request(BaseRequest):
...
@@ -65,8 +65,15 @@ class achelous_request(BaseRequest):
self
.
params
[
"unit"
]
=
unit
self
.
params
[
"unit"
]
=
unit
return
self
.
api_send
(
self
.
data
[
"unit_update"
])
return
self
.
api_send
(
self
.
data
[
"unit_update"
])
#om后台-登录
def
account_login
(
self
,
username
,
password
):
self
.
params
[
"username"
]
=
username
self
.
params
[
"password"
]
=
password
return
self
.
api_send
(
self
.
data
[
"account_login"
])
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
# print(achelous_request().batch_add_service("4176", "73809,23508,33823"))
# print(achelous_request().batch_add_service("4176", "73809,23508,33823"))
# print(achelous_request().batch_del_service("4176","7312,7311"))
# print(achelous_request().batch_del_service("4176","7312,7311"))
# print(achelous_request().special_edit("32244157","自定义专题创建1","0","2021-08-01 00:00:00","2021-09-30 00:00:00","1","自定义专题创建1","自定义专题创建1","https://heras.igengmei.com/4d5eef0a-78dd-43b3-98b7-137d2341f106-1628565831259"))
# print(achelous_request().special_edit("32244157","自定义专题创建1","0","2021-08-01 00:00:00","2021-09-30 00:00:00","1","自定义专题创建1","自定义专题创建1","https://heras.igengmei.com/4d5eef0a-78dd-43b3-98b7-137d2341f106-1628565831259"))
print
(
achelous_request
()
.
special_list
(
'1'
,
'10'
,
''
,
''
,
''
,
''
,
''
,
'1'
,
'0'
,
''
,
''
))
print
(
achelous_request
()
.
special_list
(
'1'
,
'10'
,
''
,
''
,
''
,
''
,
''
,
'1'
,
'0'
,
''
,
''
))
\ No newline at end of file
print
(
achelous_request
()
.
account_login
(
'chenrenkai'
,
'123456'
))
\ No newline at end of file
all_om_api/achelous_request.yaml
View file @
e60b035a
...
@@ -89,4 +89,14 @@ unit_update:
...
@@ -89,4 +89,14 @@ unit_update:
order
:
${order}
order
:
${order}
unit
:
${unit}
unit
:
${unit}
json
:
{}
json
:
{}
isLogin
:
1
isLogin
:
1
\ No newline at end of file
#om后台-登录
account_login
:
method
:
post
url
:
/achelous/account/login
params
:
{}
data
:
username
:
${username}
password
:
${password}
json
:
{}
\ No newline at end of file
path_setting.py
View file @
e60b035a
...
@@ -612,6 +612,8 @@ CHECK_SPU_IDS = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_dat
...
@@ -612,6 +612,8 @@ CHECK_SPU_IDS = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_dat
ACHELOUS_REQUEST_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_om_api"
,
"achelous_request.yaml"
)
ACHELOUS_REQUEST_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_om_api"
,
"achelous_request.yaml"
)
#直播-om后台-批量添加美购
#直播-om后台-批量添加美购
BATCH_ADD_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"batch_add_service.yaml"
)
BATCH_ADD_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"batch_add_service.yaml"
)
#登录
ACCOUNT_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"account_login.yaml"
)
#次卡商详页
#次卡商详页
BEAUTY_CARD_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_detail.yaml"
)
BEAUTY_CARD_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_detail.yaml"
)
...
...
test_om_case/achelous_case/test_account_login.py
0 → 100644
View file @
e60b035a
import
pytest
import
path_setting
from
all_om_api.achelous_request
import
achelous_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestAccountLogin
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ACCOUNT_DATA
)
account_login_case
,
account_login_data
=
get_ids
(
data
,
"account_login"
)
@pytest.mark.parametrize
(
"param"
,
account_login_data
,
ids
=
account_login_case
)
def
test_batch_add_service
(
self
,
param
):
r
=
achelous_request
()
.
account_login
(
param
[
'username'
],
param
[
'password'
])
if
r
[
"code"
]
==
0
:
assert
r
[
'msg'
]
==
param
[
"assert"
]
elif
r
[
"code"
]
==
20001
:
assert
r
[
'msg'
]
==
param
[
"assert"
]
elif
r
[
"code"
]
==
20005
:
assert
r
[
'msg'
]
==
param
[
"assert"
]
else
:
assert
r
[
'error'
]
==
param
[
"assert"
]
test_om_data/achelous_data/account_login.yaml
0 → 100644
View file @
e60b035a
account_login
:
-
case
:
"
om后台登录"
username
:
"
chenrenkai"
password
:
"
123456"
assert
:
"
success!"
-
case
:
"
登录失败-账号密码错误"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第二次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第三次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第四次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第五次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第六次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第七次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第八次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第九次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第十次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第十一次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第12次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第13次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第14次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第15次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第16次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第17次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第18次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第19次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
第20次登录失败"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
账号或密码输入错误,请核对后重新输入!"
-
case
:
"
登录超限账号锁定"
username
:
"
chenrenkaizidonghua"
password
:
"
dng6Rq1"
assert
:
"
尝试次数超过20次,您的帐号被锁定1小时,请1小时后重新登录"
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