接口测试
测试小飞侠
这个作者很懒,什么都没留下…
展开
-
python运行‘main’时报错:Cannot run program…(in directory…):CreateProcess error=2, 系统找不到指定的文件
Cannot run program "原项目路径\venv\Scripts\python.exe" (in directory "修改后项目路径"): CreateProcess error=2, 系统找不到指定的文件。2、点击编辑配置--运行/调试配置窗口--Python解释器,选择之前添加的解释器。1、设置-项目-Python解释器,选择可用的解释器或者添加新的解释器。添加新环境时如果提示目录非空,可以删除文件夹内的内容后再添加。原创 2024-02-01 10:16:04 · 3229 阅读 · 1 评论 -
python接口测试:request上传excel文件,Content-Type中包含boundary
from requests_toolbelt import MultipartEncoderfile = os.path.join(file_path, 'test.xlsx')encoder = MultipartEncoder({"file": (file, open(file, "rb"), 'text/plain')})header = {'Authorization': ${Authorization};'Content-Type': encoder.content_type}res = re原创 2024-02-04 16:12:26 · 265 阅读 · 0 评论