File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
instrumentation/opentelemetry-instrumentation-asgi/tests Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -801,18 +801,15 @@ class TestAsgiApplicationRaisingError(AsgiTestBase):
801
801
def tearDown (self ):
802
802
pass
803
803
804
- @mock .patch (
805
- "opentelemetry.instrumentation.asgi.collect_custom_headers_attributes" ,
806
- side_effect = ValueError ("whatever" ),
807
- )
808
- def test_asgi_issue_1883 (
809
- self , mock_collect_custom_request_headers_attributes
810
- ):
804
+ def test_asgi_issue_1883 (self ):
811
805
"""
812
806
Test that exception UnboundLocalError local variable 'start' referenced before assignment is not raised
813
807
See https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1883
814
808
"""
815
- app = otel_asgi .OpenTelemetryMiddleware (simple_asgi )
809
+ async def bad_app (_scope , _receive , _send ):
810
+ raise ValueError ("whatever" )
811
+
812
+ app = otel_asgi .OpenTelemetryMiddleware (bad_app )
816
813
self .seed_app (app )
817
814
self .send_default_request ()
818
815
try :
You can’t perform that action at this time.
0 commit comments