从python应用程序运行沙盒poser实例。
poserbox的Python项目详细描述
poser box有助于在python进程中启动和停止沙盒poser实例。poser实例将在
本地主机上选择一个空闲端口。
它主要用于测试。
poser框的典型用法:
`` python
poser box import poserbox
box=poserbox的导入请求
proxy=“http://example.com”)
box.record()
real=requests.get(“http://localhost:%s%box.port)
box.stop()
box.play()
fake=requests.get(“http://localhost:%s%box.port)
box.stop()
assert real.content==fake.content
`````
nose
----自动安装。
如果用作插件,运行实例的端口将在环境变量“poserbox_port”中导出。此名称可以在“设置”中重写。
插件公开了几个配置选项。去看他们,运行:
noestests--help
https://github.com/ziad sawalha/poserbox.git
==
----
本地主机上选择一个空闲端口。
它主要用于测试。
poser框的典型用法:
`` python
poser box import poserbox
box=poserbox的导入请求
proxy=“http://example.com”)
box.record()
real=requests.get(“http://localhost:%s%box.port)
box.stop()
box.play()
fake=requests.get(“http://localhost:%s%box.port)
box.stop()
assert real.content==fake.content
`````
nose
----自动安装。
如果用作插件,运行实例的端口将在环境变量“poserbox_port”中导出。此名称可以在“设置”中重写。
插件公开了几个配置选项。去看他们,运行:
noestests--help
https://github.com/ziad sawalha/poserbox.git
----