コード例 #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
コード例 #2
0
 def tearDown(self):
     super(BaseUrllib3TestCase, self).tearDown()
     unpatch()
コード例 #3
0
ファイル: test_urllib3.py プロジェクト: goodspark/dd-trace-py
def patch_urllib3():
    patch()
    try:
        yield
    finally:
        unpatch()