Esempio n. 1
0
    def test_untraced_request(self):
        """Disabling tracing with unpatch should submit no spans"""
        # Assumes patching is done in the setUp of the test
        unpatch()

        out = self.http.request("GET", URL_200)
        assert out.status == 200
        spans = self.pop_spans()
        assert len(spans) == 0
Esempio n. 2
0
 def tearDown(self):
     super(BaseUrllib3TestCase, self).tearDown()
     unpatch()
Esempio n. 3
0
def patch_urllib3():
    patch()
    try:
        yield
    finally:
        unpatch()