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
f7b82a29
Commit
f7b82a29
authored
Jul 30, 2021
by
aha
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' of
http://git.wanmeizhensuo.com/dengyingying/backend_auto
into common_dev
parents
7e0cc8a3
66fbb5d2
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
182 additions
and
2 deletions
+182
-2
account_request.py
all_backend_api/account_request.py
+12
-2
account_request.yaml
all_backend_api/account_request.yaml
+10
-0
user_request.py
all_backend_api/user_request.py
+21
-0
user_request.yaml
all_backend_api/user_request.yaml
+23
-0
path_setting.py
path_setting.py
+14
-0
test_account_homepage.py
test_backend_case/account_case/test_account_homepage.py
+18
-0
test_favors_answers.py
test_backend_case/user_case/test_favors_answers.py
+18
-0
test_favors_tractate.py
test_backend_case/user_case/test_favors_tractate.py
+18
-0
account_homepage.yaml
test_backend_data/account_data/account_homepage.yaml
+16
-0
favors_answers.yaml
test_backend_data/user_data/favors_answers.yaml
+16
-0
favors_tractate.yaml
test_backend_data/user_data/favors_tractate.yaml
+16
-0
No files found.
all_backend_api/account_request.py
View file @
f7b82a29
...
...
@@ -14,8 +14,18 @@ class account_request(BaseRequest):
self
.
params
[
"face_token"
]
=
face_token
return
self
.
api_send
(
self
.
loginvfc
[
"login_vfc"
])
# 我的-头像点击
def
account_homepage
(
self
,
user_id
,
device_id
):
self
.
params
[
"user_id"
]
=
user_id
self
.
params
[
"device_id"
]
=
device_id
return
self
.
api_send
(
self
.
loginvfc
[
"account_homepage"
])
if
__name__
==
'__main__'
:
# print(account_request().user_info())
print
(
account_request
.
loginvfc
(
""
))
\ No newline at end of file
print
(
account_request
.
loginvfc
(
""
))
print
(
account_request
()
.
account_homepage
(
"33910245"
,
"androidid_16a95f3fa31a4c0b"
))
\ No newline at end of file
all_backend_api/account_request.yaml
View file @
f7b82a29
...
...
@@ -12,3 +12,12 @@ login_vfc:
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
account_homepage
:
method
:
get
url
:
/api/account/homepage
params
:
user_id
:
${user_id}
device_id
:
${device_id}
data
:
json
:
{}
isLogin
:
1
\ No newline at end of file
all_backend_api/user_request.py
View file @
f7b82a29
...
...
@@ -119,6 +119,21 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"favors_topics"
])
# 我的-收藏-帖子
def
favors_tractate
(
self
,
page
,
count
):
self
.
params
[
"page"
]
=
page
self
.
params
[
"count"
]
=
count
return
self
.
api_send
(
self
.
data
[
"favors_tractate"
])
# 我的-收藏-回答
def
favors_answers
(
self
,
page
,
count
):
self
.
params
[
"page"
]
=
page
self
.
params
[
"count"
]
=
count
return
self
.
api_send
(
self
.
data
[
"favors_answers"
])
...
...
@@ -158,6 +173,12 @@ if __name__ == '__main__':
# 我的-收藏-日记贴
print
(
user_request
()
.
favors_topics
(
0
,
10
))
# 我的-收藏-帖子
print
(
user_request
()
.
favors_tractate
(
1
,
10
))
# 我的-收藏-帖子
print
(
user_request
()
.
favors_answers
(
1
,
10
))
all_backend_api/user_request.yaml
View file @
f7b82a29
...
...
@@ -157,3 +157,25 @@ favors_topics:
isLogin
:
1
# 我的-收藏-帖子
favors_tractate
:
method
:
GET
url
:
/api/user/favors/tractate
params
:
page
:
${page}
count
:
${count}
data
:
{}
json
:
{}
isLogin
:
1
# 我的-收藏-回答
favors_answers
:
method
:
GET
url
:
/api/user/favors/answers
params
:
page
:
${page}
count
:
${count}
data
:
{}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
f7b82a29
...
...
@@ -711,5 +711,18 @@ FAVORS_TOPICS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data
#直播-新增标签
TAG_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"tag_request.yaml"
)
TAG_ADD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tag_data"
,
"tag_add.yaml"
)
#我的-收藏-帖子
FAVORS_TRACTATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
FAVORS_TRACTATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"favors_tractate.yaml"
)
#我的-收藏-帖子
FAVORS_ANSWERS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
FAVORS_ANASWERS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"favors_answers.yaml"
)
#我的-头像点击
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"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
\ No newline at end of file
test_backend_case/account_case/test_account_homepage.py
0 → 100644
View file @
f7b82a29
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.account_request
import
account_request
class
TestAccount_Homepage
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ACCOUNT_HOMEPAGE
)
account_homepage_case
,
account_homepage_data
=
get_ids
(
data
,
"account_homepage"
)
@pytest.mark.parametrize
(
"param"
,
account_homepage_data
,
ids
=
account_homepage_case
)
def
test_account_homepage
(
self
,
param
):
r
=
account_request
()
.
account_homepage
(
param
[
"user_id"
],
param
[
"device_id"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/user_case/test_favors_answers.py
0 → 100644
View file @
f7b82a29
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
TestFavorsAnswers
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FAVORS_ANASWERS
)
favors_answers_case
,
favors_answers_data
=
get_ids
(
data
,
"favors_answers"
)
@pytest.mark.parametrize
(
"param"
,
favors_answers_data
,
ids
=
favors_answers_case
)
def
test_favors_answers
(
self
,
param
):
r
=
user_request
()
.
favors_answers
(
param
[
"page"
],
param
[
"count"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/user_case/test_favors_tractate.py
0 → 100644
View file @
f7b82a29
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
TestFavorsTractate
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FAVORS_TRACTATE
)
favors_tractate_case
,
favors_tractate_data
=
get_ids
(
data
,
"favors_tractate"
)
@pytest.mark.parametrize
(
"param"
,
favors_tractate_data
,
ids
=
favors_tractate_case
)
def
test_favors_tractate
(
self
,
param
):
r
=
user_request
()
.
favors_tractate
(
param
[
"page"
],
param
[
"count"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_data/account_data/account_homepage.yaml
0 → 100644
View file @
f7b82a29
account_homepage
:
#我的-头像点击
-
case
:
"
我的页面-头像点击"
user_id
:
33910245
device_id
:
androidid_16a95f3fa31a4c0b
assert
:
0
test_backend_data/user_data/favors_answers.yaml
0 → 100644
View file @
f7b82a29
favors_answers
:
#我的-收藏-回答
-
case
:
"
我的页面-收藏-回答"
page
:
1
count
:
10
assert
:
0
test_backend_data/user_data/favors_tractate.yaml
0 → 100644
View file @
f7b82a29
favors_tractate
:
#我的-收藏-帖子
-
case
:
"
我的页面-收藏-帖子"
page
:
1
count
:
10
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