Skip to content

Commit cf16d60

Browse files
committed
Fixed test
1 parent e612547 commit cf16d60

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

opentelemetry-api/tests/attributes/test_attributes.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,7 @@ def test_mapping(self):
194194
)
195195

196196
def test_wsgi_request_attribute(self):
197-
# Test WSGIRequest type validation
198-
try:
199-
# Configure Django settings if not already configured
197+
if _HAS_DJANGO:
200198
if not settings.configured:
201199
settings.configure(
202200
DEBUG=True,
@@ -251,10 +249,6 @@ def test_wsgi_request_attribute(self):
251249
)
252250
self.assertEqual(cleaned_mapping, {"request": expected_cleaned})
253251

254-
except ImportError:
255-
# Skip test if django is not available
256-
self.skipTest("Django not available")
257-
258252

259253
class TestBoundedAttributes(unittest.TestCase):
260254
# pylint: disable=consider-using-dict-items

0 commit comments

Comments
 (0)