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
def tearDown(self): super(BaseUrllib3TestCase, self).tearDown() unpatch()
def patch_urllib3(): patch() try: yield finally: unpatch()