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