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
e90b6fd2
Commit
e90b6fd2
authored
Jul 23, 2021
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播-新增标签
parent
734b439a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
0 deletions
+49
-0
tag_request.py
all_backend_api/tag_request.py
+14
-0
tag_request.yaml
all_backend_api/tag_request.yaml
+10
-0
path_setting.py
path_setting.py
+4
-0
__init__.py
test_backend_case/tag_case/__init__.py
+0
-0
test_tag_add.py
test_backend_case/tag_case/test_tag_add.py
+15
-0
__init__.py
test_backend_data/tag_data/__init__.py
+0
-0
tag_add.yaml
test_backend_data/tag_data/tag_add.yaml
+6
-0
No files found.
all_backend_api/tag_request.py
0 → 100644
View file @
e90b6fd2
import
path_setting
from
in_common.base_request
import
BaseRequest
class
tag_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
TAG_CONFIG
)
#直播开播新加标签
def
tag_add
(
self
,
name
):
self
.
params
[
"name"
]
=
name
return
self
.
api_send
(
self
.
data
[
"tag_add"
])
if
__name__
==
'__main__'
:
print
(
tag_request
()
.
tag_add
(
"你好"
))
\ No newline at end of file
all_backend_api/tag_request.yaml
0 → 100644
View file @
e90b6fd2
#新增标签
tag_add
:
method
:
post
url
:
/api/tag/add
params
:
{}
data
:
name
:
${name}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
e90b6fd2
...
...
@@ -625,5 +625,9 @@ FAVORS_SERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_da
#我的-帖子-我回复的
REPLY_TRACTATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
REPLY_TRACTATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"reply_tractate.yaml"
)
#直播-新增标签
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"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/tag_case/__init__.py
0 → 100644
View file @
e90b6fd2
test_backend_case/tag_case/test_tag_add.py
0 → 100644
View file @
e90b6fd2
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.tag_request
import
tag_request
class
TestTagAdd
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TAG_ADD
)
tag_add_case
,
tag_add_data
=
get_ids
(
data
,
"tag_add"
)
@pytest.mark.parametrize
(
"param"
,
tag_add_data
,
ids
=
tag_add_case
)
def
test_tag_add
(
self
,
param
):
r
=
tag_request
()
.
tag_add
(
param
[
"name"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_data/tag_data/__init__.py
0 → 100644
View file @
e90b6fd2
test_backend_data/tag_data/tag_add.yaml
0 → 100644
View file @
e90b6fd2
tag_add
:
-
case
:
"
直播-新增标签"
name
:
"
小冤家专属标签"
assert
:
0
\ 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