Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
on_line_product
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
邓莹莹
on_line_product
Commits
55980d76
Commit
55980d76
authored
Jul 21, 2021
by
邓莹莹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释jsonpath
parent
a2f442f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
base_request.py
in_common/base_request.py
+5
-5
No files found.
in_common/base_request.py
View file @
55980d76
...
@@ -3,7 +3,7 @@ import random
...
@@ -3,7 +3,7 @@ import random
import
string
import
string
import
requests
import
requests
import
yaml
import
yaml
from
jsonpath
import
jsonpath
#
from jsonpath import jsonpath
from
login_session_function
import
LoginFunction
from
login_session_function
import
LoginFunction
# from pymysql import OperationalError
# from pymysql import OperationalError
...
@@ -28,10 +28,10 @@ class BaseRequest:
...
@@ -28,10 +28,10 @@ class BaseRequest:
def
api_load
(
self
,
path
:
object
)
->
object
:
def
api_load
(
self
,
path
:
object
)
->
object
:
return
self
.
yaml_load
(
path
)
return
self
.
yaml_load
(
path
)
def
jsonpath
(
self
,
path
,
r
=
None
,
**
kwargs
):
#
def jsonpath(self, path, r=None, **kwargs):
if
r
is
None
:
#
if r is None:
r
=
self
.
r
.
json
()
#
r = self.r.json()
return
jsonpath
(
r
,
path
)
#
return jsonpath(r, path)
def
api_send
(
self
,
req
:
object
)
->
object
:
def
api_send
(
self
,
req
:
object
)
->
object
:
host
=
self
.
api_load
(
path_setting
.
HOSTYAML_CONFIG
)
host
=
self
.
api_load
(
path_setting
.
HOSTYAML_CONFIG
)
...
...
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