下拉刷新
Repository Details
Shared bynavbar_avatar
repo_avatar
HelloGitHub Rating
0 ratings
采用装饰器方式自动模拟 HTTP 返回值的库
FreeMIT
Claim
Collect
Share
2.8k
Stars
No
Chinese
Python
Language
Yes
Active
127
Contributors
174
Issues
No
Organization
7.0.0
Latest
414
Forks
MIT
License
More
把 HTTP 的请求拦截下来,返回本地准备好的数据的库。就像“插卡”一样,使用装饰器方式修饰的函数会被拦截下来,直接返回指定本地路径的文件中的数据,从而提高测试执行速度和确定性 ```python @vcr.use_cassette('fixtures/vcr_cassettes/synopsis.yaml') def test_iana(): response = urllib2.urlopen('http://www.iana.org/domains/reserved').read() assert 'Example domains' in response ```
Included in:
Vol.59
Tags:
mock
Python

Comments

Rating:
No comments yet