SensoroApiAutoTest/common/base_api.py

23 lines
469 B
Python
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# !/usr/bin/python
# -*- coding:utf-8 -*-
import json
import requests
class BaseApi:
"""基础类,提供公共方法"""
def send_(self, data) -> json:
"""发送请求返回json格式数据"""
r = requests.request(**data)
return r.json()
def delete_(self) -> json:
"""删除请求返回json格式数据"""
pass
def put_(self) -> json:
"""修改请求返回json格式数据"""
pass