VCR.pyHTTP 交互模擬庫
VCR.py 可自動化的模擬你的 HTTP 交互來簡化和加速測試。VCR.py 是 Ruby 版本的 VCR 的 Python 移植版本。
使用方法:
import vcr
import urllib2
with vcr.use_cassette('fixtures/vcr_cassettes/synopsis.yaml'):
response = urllib2.urlopen('http://www.iana.org/domains/reserved').read()
assert 'Example domains' in response評論
圖片
表情
