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
915b4918
You need to sign in or sign up before continuing.
Commit
915b4918
authored
Aug 02, 2021
by
冯艮霞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签到情况
parent
c68e4a48
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
243 additions
and
0 deletions
+243
-0
polymerization_request.py
all_backend_api/polymerization_request.py
+27
-0
polymerization_request.yaml
all_backend_api/polymerization_request.yaml
+17
-0
user_request.py
all_backend_api/user_request.py
+30
-0
user_request.yaml
all_backend_api/user_request.yaml
+29
-0
path_setting.py
path_setting.py
+13
-0
__init__.py
test_backend_case/polymerization_case/__init__.py
+0
-0
test_content.py
test_backend_case/polymerization_case/test_content.py
+19
-0
test_base_sign_data.py
test_backend_case/user_case/test_base_sign_data.py
+18
-0
test_following_or_fans.py
test_backend_case/user_case/test_following_or_fans.py
+18
-0
__init__.py
test_backend_data/polymerization_data/__init__.py
+0
-0
polymerization_content.yaml
...kend_data/polymerization_data/polymerization_content.yaml
+30
-0
base_sign_data.yaml
test_backend_data/user_data/base_sign_data.yaml
+16
-0
following_or_fans.yaml
test_backend_data/user_data/following_or_fans.yaml
+26
-0
No files found.
all_backend_api/polymerization_request.py
View file @
915b4918
import
path_setting
from
in_common.base_request
import
BaseRequest
class
polymerization_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
POLYMERIZATION_CONFIG
)
def
content
(
self
,
tabtype
,
category_polymer_id
,
page
,
tag_ids
,
operation_id
,
level
,
device_id
,
current_city_id
,
version
):
self
.
params
[
"tabtype"
]
=
tabtype
self
.
params
[
"category_polymer_id"
]
=
category_polymer_id
self
.
params
[
"page"
]
=
page
self
.
params
[
"tag_ids"
]
=
tag_ids
self
.
params
[
"operation_id"
]
=
operation_id
self
.
params
[
"level"
]
=
level
self
.
params
[
"device_id"
]
=
device_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"content"
])
if
__name__
==
'__main__'
:
print
(
polymerization_request
()
.
content
(
"home_video"
,
"39"
,
"1"
,
"[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
,
"12"
,
"1"
,
"869378034450718"
,
"beijing"
,
"7.45.0"
))
all_backend_api/polymerization_request.yaml
0 → 100644
View file @
915b4918
#品类聚合页面社区和视频tab
content
:
method
:
get
url
:
/api/polymerization/content
params
:
tabtype
:
${tabtype}
category_polymer_id
:
${category_polymer_id}
page
:
${page}
tag_ids
:
${tag_ids}
operation_id
:
${operation_id}
level
:
${level}
device_id
:
${device_id}
current_city_id
:
${current_city_id}
version
:
${version}
data
:
{}
json
:
{}
isLogin
:
1
all_backend_api/user_request.py
View file @
915b4918
...
...
@@ -112,9 +112,37 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"favors_answers"
])
# 我的-粉丝和关注
def
following_or_fans
(
self
,
start_num
,
uid
,
type
,
version
,
current_city_id
,
device_id
):
self
.
params
[
"start_num"
]
=
start_num
self
.
params
[
"uid"
]
=
uid
self
.
params
[
"type"
]
=
type
self
.
params
[
"version"
]
=
version
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"device_id"
]
=
device_id
return
self
.
api_send
(
self
.
data
[
"following_or_fans"
])
# 签到情况
def
base_sign_data
(
self
,
client_source
,
json
,
version
,
device_id
):
self
.
params
[
"client_source"
]
=
client_source
self
.
params
[
"json"
]
=
json
self
.
params
[
"version"
]
=
version
self
.
params
[
"device_id"
]
=
device_id
return
self
.
api_send
(
self
.
data
[
"base_sign_data"
])
if
__name__
==
'__main__'
:
#签到情况
print
(
user_request
()
.
base_sign_data
(
"app"
,
""
,
"7.45.0"
,
"869378034450718"
))
# 我的-我的粉丝
print
(
user_request
()
.
following_or_fans
(
0
,
"33910245"
,
"fans"
,
"7.45.0"
,
"beijing"
,
"androidid_16a95f3fa31a4c0b"
))
#个人中心
print
(
user_request
()
.
personal_center
())
...
...
@@ -154,3 +182,5 @@ if __name__ == '__main__':
all_backend_api/user_request.yaml
View file @
915b4918
...
...
@@ -137,3 +137,31 @@ favors_answers:
data
:
{}
json
:
{}
isLogin
:
1
# 我的-粉丝和关注
following_or_fans
:
method
:
GET
url
:
/api/user/following_or_fans
params
:
start_num
:
${start_num}
uid
:
${uid}
type
:
${type}
version
:
${version}
current_city_id
:
${current_city_id}
device_id
:
${device_id}
data
:
{}
json
:
{}
isLogin
:
1
# 我的-粉丝和关注
base_sign_data
:
method
:
GET
url
:
/api/user/base_sign_data
params
:
version
:
${version}
client_source
:
${client_source}
json
:
${json}
device_id
:
${device_id}
data
:
{}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
915b4918
...
...
@@ -452,5 +452,18 @@ FAVORS_ANASWERS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_da
ACCOUNT_HOMEPAGE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"account_request.yaml"
)
ACCOUNT_HOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/account_data"
,
"account_homepage.yaml"
)
#我的-我的粉丝
FOLLOWING_OR_FANS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
FOLLOWING_OR_FANS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"following_or_fans.yaml"
)
#品类聚合页-社区
POLYMERIZATION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"polymerization_request.yaml"
)
POLYMERIZATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/polymerization_data"
,
"polymerization_content.yaml"
)
#签到情况
BASE_SIGN_DATA_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
BASE_SIGN_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"base_sign_data.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/polymerization_case/__init__.py
0 → 100644
View file @
915b4918
test_backend_case/polymerization_case/test_content.py
0 → 100644
View file @
915b4918
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.polymerization_request
import
polymerization_request
class
TestPolymerizationContent
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
POLYMERIZATION
)
polymerization_content_case
,
polymerization_content_data
=
get_ids
(
data
,
"polymerization_content"
)
@pytest.mark.parametrize
(
"param"
,
polymerization_content_data
,
ids
=
polymerization_content_case
)
def
test_content
(
self
,
param
):
r
=
polymerization_request
()
.
content
(
param
[
"tabtype"
],
param
[
"category_polymer_id"
],
param
[
"page"
],
param
[
"tag_ids"
],
param
[
"operation_id"
],
param
[
"level"
],
param
[
"device_id"
],
param
[
"current_city_id"
],
param
[
"version"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/user_case/test_base_sign_data.py
0 → 100644
View file @
915b4918
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.user_request
import
user_request
class
TestBaseSignData
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BASE_SIGN_DATA
)
base_sign_data_case
,
base_sign_data_data
=
get_ids
(
data
,
"base_sign_data"
)
@pytest.mark.parametrize
(
"param"
,
base_sign_data_data
,
ids
=
base_sign_data_case
)
def
test_fbase_sign_data
(
self
,
param
):
r
=
user_request
()
.
base_sign_data
(
param
[
"client_source"
],
param
[
"json"
],
param
[
"version"
],
param
[
"device_id"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/user_case/test_following_or_fans.py
0 → 100644
View file @
915b4918
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.user_request
import
user_request
class
TestFollowingOrFans
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FOLLOWING_OR_FANS
)
following_or_fans_case
,
following_or_fans_data
=
get_ids
(
data
,
"following_or_fans"
)
@pytest.mark.parametrize
(
"param"
,
following_or_fans_data
,
ids
=
following_or_fans_case
)
def
test_following_or_fans
(
self
,
param
):
r
=
user_request
()
.
following_or_fans
(
param
[
"start_num"
],
param
[
"uid"
],
param
[
"type"
],
param
[
"version"
],
param
[
"current_city_id"
],
param
[
"device_id"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_data/polymerization_data/__init__.py
0 → 100644
View file @
915b4918
test_backend_data/polymerization_data/polymerization_content.yaml
View file @
915b4918
polymerization_content
:
#品类聚合页社区tab
-
case
:
"
品类聚合页面社区tab"
tabtype
:
home_video
category_polymer_id
:
39
page
:
1
tag_ids
:
[
3239
,
3242
,
3243
,
3245
,
3246
,
3247
,
3248
,
3275
,
3277
,
3278
,
3279
,
3289
,
3309
]
operation_id
:
12
level
:
1
device_id
:
869378034450718
current_city_id
:
beijing
version
:
7.45.0
assert
:
0
-
case
:
"
品类聚合页面视频tab"
tabtype
:
choice
category_polymer_id
:
39
page
:
1
tag_ids
:
[
3239
,
3242
,
3243
,
3245
,
3246
,
3247
,
3248
,
3275
,
3277
,
3278
,
3279
,
3289
,
3309
]
operation_id
:
12
level
:
1
device_id
:
869378034450718
current_city_id
:
beijing
version
:
7.45.0
assert
:
0
test_backend_data/user_data/base_sign_data.yaml
0 → 100644
View file @
915b4918
base_sign_data
:
#签到情况
-
case
:
"
签到情况"
client_source
:
app
json
:
version
:
7.45.0
device_id
:
869378034450718
assert
:
0
test_backend_data/user_data/following_or_fans.yaml
0 → 100644
View file @
915b4918
following_or_fans
:
#我的-粉丝和关注
-
case
:
"
我的-我的粉丝"
start_num
:
0
uid
:
33910245
type
:
fans
version
:
7.45.0
current_city_id
:
beijing
device_id
:
androidid_16a95f3fa31a4c0b
assert
:
0
-
case
:
"
我的-我的关注"
start_num
:
0
uid
:
33910245
type
:
following
version
:
7.45.0
current_city_id
:
beijing
device_id
:
androidid_16a95f3fa31a4c0b
assert
:
0
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