文件名称:aioresponses:Aioresponses是python aiohttp包中的嘲笑Web请求的帮助程序
文件大小:30KB
文件格式:ZIP
更新时间:2024-05-26 10:57:57
test mocking aiohttp asyncio Python
空气React Aioresponses是在python aiohttp包中模拟/伪造Web请求的助手。 对于请求模块,有很多可以帮助我们进行测试的软件包(例如, httpretty , responses , requests-mock )。 当测试异步HTTP请求时,要困难一些(至少在开始时如此)。 该软件包的目的是提供一种测试异步HTTP请求的简便方法。 正在安装 $ pip install aioresponses 支持的版本 Python 3.5.3+ aiohttp> = 2.0.0,<4.0.0 用法 要模拟出HTTP请求,请使用aiorespons作为方法装饰器或上下文管理器。 可以模拟响应状态代码,主体,有效负载(用于json响应)和标头。 支持的HTTP方法: GET , POST , PUT , PATCH , DELETE和OPTIONS 。 impo
【文件预览】:
aioresponses-master
----MANIFEST.in(264B)
----.travis.yml(2KB)
----README.rst(7KB)
----requirements-dev.txt(153B)
----.coveragerc(84B)
----docs()
--------history.rst(28B)
--------conf.py(8KB)
--------usage.rst(79B)
--------make.bat(6KB)
--------installation.rst(1KB)
--------modules.rst(73B)
--------aioresponses.rst(329B)
--------authors.rst(28B)
--------readme.rst(27B)
--------Makefile(7KB)
--------index.rst(506B)
--------contributing.rst(33B)
----AUTHORS.rst(162B)
----.pyup.yml(134B)
----.landscape.yml(21B)
----CONTRIBUTING.rst(3KB)
----tests()
--------test_aioresponses.py(22KB)
--------test_compat.py(2KB)
--------__init__.py(0B)
--------base.py(1KB)
----tox.ini(1019B)
----LICENSE(1KB)
----HISTORY.rst(81B)
----setup.cfg(963B)
----requirements.txt(22B)
----unittest.cfg(147B)
----setup.py(103B)
----.gitignore(1KB)
----aioresponses()
--------core.py(14KB)
--------compat.py(1KB)
--------__init__.py(151B)
----Makefile(2KB)