1 Star 0 Fork 0

L7_simple / httprunner_demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
debugtalk.py 833 Bytes
一键复制 编辑 原始数据 按行查看 历史
simple 提交于 2021-12-24 21:40 . first commit and work.weixin testcases
import os
import time
import requests
import yaml
from httprunner import __version__
def get_httprunner_version():
return __version__
def sum_two(m, n):
return m + n
def sleep(n_secs):
time.sleep(n_secs)
def parameterizes(datapath):
file_path = os.path.dirname(__file__)
with open(file_path + datapath, encoding='utf-8') as file:
content = yaml.load(file.read())
return content
def dict_get_param(dict, name):
return dict[name]
def new_name(name1):
return name1 + '2'
def new_mobile(mobile):
return str(int(mobile)+1000)
def get_token():
corp = parameterizes('/data/corp.yaml')
url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken"
r = requests.get(url, params=corp)
return r.json()['access_token']
# if __name__=='__main__':
# print(get_token())
Python
1
https://gitee.com/L7_simple/httprunner_demo.git
git@gitee.com:L7_simple/httprunner_demo.git
L7_simple
httprunner_demo
httprunner_demo
master

搜索帮助