def test_multiple_requests(self): body1 = urllib2.urlopen('http://httpbin.org/').read() body2 = urllib2.urlopen('http://httpbin.org/get').read() with vcr.use_cassette(TEST_CASSETTE_FILE): self.assertEqual(body1, urllib2.urlopen('http://httpbin.org/').read()) new_body2 = urllib2.urlopen('http://httpbin.org/get').read() assert_httpbin_responses_equal(body2, new_body2) self.assertEqual(body1, urllib2.urlopen('http://httpbin.org/').read()) new_body2 = urllib2.urlopen('http://httpbin.org/get').read() assert_httpbin_responses_equal(body2, new_body2)
def test_cached_post_response_text(self): assert_httpbin_responses_equal(self.unmolested_response.text, self.cached_response.text)
def test_initial_post_response_text(self): assert_httpbin_responses_equal(self.unmolested_response.text, self.initial_response.text)