From 8e515674a1a7f27cf2a367e694ef858b29986b13 Mon Sep 17 00:00:00 2001 From: Bergutov Ruslan Date: Tue, 19 May 2020 19:04:56 +0500 Subject: [PATCH] clean up, lint fix --- .../tests/test_requests_integration.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ext/opentelemetry-ext-requests/tests/test_requests_integration.py b/ext/opentelemetry-ext-requests/tests/test_requests_integration.py index 4c211ae8daf..01f335e4239 100644 --- a/ext/opentelemetry-ext-requests/tests/test_requests_integration.py +++ b/ext/opentelemetry-ext-requests/tests/test_requests_integration.py @@ -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 @@ -231,11 +232,8 @@ def test_custom_tracer_provider(self): self.assertIs(span.resource, resource) def test_if_headers_equals_none(self): - resource = resources.Resource.create({}) - result = self.create_tracer_provider(resource=resource) - tracer_provider, exporter = result RequestsInstrumentor().uninstrument() - RequestsInstrumentor().instrument(tracer_provider=tracer_provider) + RequestsInstrumentor().instrument(tracer_provider=TracerProvider()) result = requests.get(self.URL, headers=None) self.assertEqual(result.text, "Hello!")