@@ -695,14 +695,15 @@ def test_http_custom_response_headers_not_in_span_attributes(self):
695
695
696
696
class TestHTTPAppWithCustomHeadersParameters (TestBase ):
697
697
"""Minimal tests here since the behavior of this logic is tested above and in the ASGI tests."""
698
+
698
699
def setUp (self ):
699
700
super ().setUp ()
700
701
self .app = self ._create_app ()
701
702
otel_fastapi .FastAPIInstrumentor ().instrument_app (
702
703
self .app ,
703
704
http_capture_headers_server_request = ["a.*" , "b.*" ],
704
705
http_capture_headers_server_response = ["c.*" , "d.*" ],
705
- http_capture_headers_sanitize_fields = [".*secret.*" ]
706
+ http_capture_headers_sanitize_fields = [".*secret.*" ],
706
707
)
707
708
self .client = TestClient (self .app )
708
709
@@ -728,9 +729,14 @@ async def _():
728
729
return app
729
730
730
731
def test_http_custom_request_headers_in_span_attributes (self ):
731
- resp = self .client .get ("/foobar" , headers = {
732
- "apple" : "red" , "banana-secret" : "yellow" , "fig" : "green"
733
- })
732
+ resp = self .client .get (
733
+ "/foobar" ,
734
+ headers = {
735
+ "apple" : "red" ,
736
+ "banana-secret" : "yellow" ,
737
+ "fig" : "green" ,
738
+ },
739
+ )
734
740
self .assertEqual (200 , resp .status_code )
735
741
span_list = self .memory_exporter .get_finished_spans ()
736
742
self .assertEqual (len (span_list ), 3 )
0 commit comments