Repository Details
Shared by
HelloGitHub Rating
0 ratings
采用装饰器方式自动模拟 HTTP 返回值的库
Past 7 days Received 2 stars ✨
Use arrow keys to explore dates, Home and End for the first and last date, Escape to dismiss.| Date | Star | Daily change |
|---|---|---|
| 周二 | 3,023 | — |
| 周三 | 3,023 | 0 |
| 周四 | 3,024 | +1 |
| 周五 | 3,024 | 0 |
| 周六 | 3,024 | 0 |
| 周日 | 3,025 | +1 |
| 周一 | 3,025 | 0 |
3k
Stars
No
Chinese
Python
Language
Yes
Active
191
Contributors
44
Issues
No
Organization
None
Latest
451
Forks
MIT
License
把 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
```
Comments
Rating:
No comments yet