From d50ded68caac449dc5d4673b6fcca9e820354c35 Mon Sep 17 00:00:00 2001 From: Veros Kaplan Date: Wed, 6 Nov 2013 13:33:31 +0100 Subject: [PATCH] Added test: accessing same recource three times in once mode --- tests/integration/test_record_mode.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/integration/test_record_mode.py b/tests/integration/test_record_mode.py index e3fdc8d..f38c9bb 100644 --- a/tests/integration/test_record_mode.py +++ b/tests/integration/test_record_mode.py @@ -32,6 +32,14 @@ def test_once_record_mode_two_times(tmpdir): response = urllib2.urlopen('http://httpbin.org/').read() response = urllib2.urlopen('http://httpbin.org/').read() +def test_once_mode_three_times(tmpdir): + testfile = str(tmpdir.join('recordmode.yml')) + with vcr.use_cassette(testfile, record_mode="once"): + # get three same files + response1 = urllib2.urlopen('http://httpbin.org/').read() + response2 = urllib2.urlopen('http://httpbin.org/').read() + response2 = urllib2.urlopen('http://httpbin.org/').read() + def test_new_episodes_record_mode(tmpdir): testfile = str(tmpdir.join('recordmode.yml'))