摘要: Fixture 是一些函数,pytest 会在执行测试函数之前(或之后)加载运行它们。可以用它做一些事情,比如数据库的链接操作之类 import pytest @pytest.fixture() def post_code(): return '010' def test_postcode(post 阅读全文
posted @ 2022-03-30 17:01 北京测试菜鸟 阅读(245) 评论(0) 推荐(0)
摘要: 参数意思: argnames:是一个字符串,是参数的名字,如果有多个参数时,用逗号分隔argvalues:是一个列表(或者元祖),是具体的要传入的数据 indirect:为true时,那argnames一定是一个fixture函数名称,argvalues值将传入对应的fixture内,相当于@pyt 阅读全文
posted @ 2022-03-30 16:41 北京测试菜鸟 阅读(673) 评论(0) 推荐(0)
摘要: 1、requests-toolbelt官方文档:https://pypi.org/project/requests-toolbelt/ 2、环境安装 pip install requests-toolbelt 3、 multipart/form-data传文件 from requests_toolb 阅读全文
posted @ 2022-03-30 13:17 北京测试菜鸟 阅读(1725) 评论(0) 推荐(0)