Skip to content

Commit

Permalink
Fixing lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashutosh Goel committed Feb 17, 2022
1 parent dadd49c commit 447533e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def normalise_request_header_name(header):


def normalise_response_header_name(header):
key=header.lower().replace("-", "_")
key = header.lower().replace("-", "_")
return f"http.response.header.{key}"


Expand Down
17 changes: 11 additions & 6 deletions util/opentelemetry-util-http/tests/test_capture_custom_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def test_get_custom_request_header(self):
custom_headers_to_capture = get_custom_headers(
OTEL_PYTHON_CAPTURE_REQUEST_HEADERS
)
self.assertEqual(custom_headers_to_capture, ["User-Agent", "Test-Header"])
self.assertEqual(
custom_headers_to_capture, ["User-Agent", "Test-Header"]
)

@patch.dict(
"os.environ",
Expand All @@ -45,11 +47,14 @@ def test_get_custom_response_header(self):
custom_headers_to_capture = get_custom_headers(
OTEL_PYTHON_CAPTURE_RESPONSE_HEADERS
)
self.assertEqual(custom_headers_to_capture, [
"content-type",
"content-length",
"test-header",
])
self.assertEqual(
custom_headers_to_capture,
[
"content-type",
"content-length",
"test-header",
],
)

def test_normalise_request_header_name(self):
key = normalise_request_header_name("Test-Header")
Expand Down

0 comments on commit 447533e

Please sign in to comment.