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
Beispiel #2
0
 def tearDown(self):
     recorder.save()
     super(TestBloggerWeb, self).tearDown()
Beispiel #3
0
 def tearDown(self):
     recorder.save()
     super(TestFlickrWeb, self).tearDown()
Beispiel #4
0
 def tearDown(self):
     recorder.save()
     super(TestFoursquareWeb, self).tearDown()
Beispiel #5
0
 def tearDown(self):
     recorder.save()
     super(TestTwitterWeb, self).tearDown()
Beispiel #6
0
 def tearDown(self):
     recorder.save()
     super(TestGooglePlusWeb, self).tearDown()
Beispiel #7
0
 def tearDown(self):
     recorder.save()
     super(TestRedditWeb, self).tearDown()
Beispiel #8
0
 def tearDown(self):
     recorder.save()
     super(TestLinkedInWeb, self).tearDown()
Beispiel #9
0
 def tearDown(self):
     recorder.save()
     super(TestRunKeeperWeb, self).tearDown()
Beispiel #10
0
 def tearDown(self):
     recorder.save()
     super(TestGitHubWeb, self).tearDown()
Beispiel #11
0
 def tearDown(self):
     recorder.save()
     super(TestFacebookWeb, self).tearDown()