def test_response_filter(self): ms = MockService() recorder.use_filters = True recorder.wrap(ms.actually_request) recorder.record() args = [] kwargs = {"url": "http://example.com/year"} resp = yield ms.request(**kwargs) self.assertEqual(resp["year"], 2013) recorder.stop() recorder.save() resp = yield ms.request(url="http://example.com/year") self.assertEqual(resp["year"], 3013) # we must turn off filters here, or we'll get strange database errors on setup for other # tests recorder.use_filters = False
def tearDown(self): recorder.save() super(TestBloggerWeb, self).tearDown()
def tearDown(self): recorder.save() super(TestFlickrWeb, self).tearDown()
def tearDown(self): recorder.save() super(TestFoursquareWeb, self).tearDown()
def tearDown(self): recorder.save() super(TestTwitterWeb, self).tearDown()
def tearDown(self): recorder.save() super(TestGooglePlusWeb, self).tearDown()
def tearDown(self): recorder.save() super(TestRedditWeb, self).tearDown()
def tearDown(self): recorder.save() super(TestLinkedInWeb, self).tearDown()
def tearDown(self): recorder.save() super(TestRunKeeperWeb, self).tearDown()
def tearDown(self): recorder.save() super(TestGitHubWeb, self).tearDown()
def tearDown(self): recorder.save() super(TestFacebookWeb, self).tearDown()