Skip to content

Commit

Permalink
instrumenting returned in requests tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HiveTraum committed May 28, 2020
1 parent 3826a2c commit 36583a5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from opentelemetry import context, propagators, trace
from opentelemetry.ext.requests import RequestsInstrumentor
from opentelemetry.sdk import resources
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.test.mock_httptextformat import MockHTTPTextFormat
from opentelemetry.test.test_base import TestBase

Expand Down Expand Up @@ -231,5 +232,7 @@ def test_custom_tracer_provider(self):
self.assertIs(span.resource, resource)

def test_if_headers_equals_none(self):
RequestsInstrumentor().uninstrument()
RequestsInstrumentor().instrument(tracer_provider=TracerProvider())
result = requests.get(self.URL, headers=None)
self.assertEqual(result.text, "Hello!")

0 comments on commit 36583a5

Please sign in to comment.