Skip to content

Commit 451f194

Browse files
committed
linting fix
1 parent f97fd24 commit 451f194

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

aws-opentelemetry-distro/tests/amazon/opentelemetry/distro/test_otlp_sigv4_exporter.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
33
import os
4-
import time
54
from unittest import TestCase
65
from unittest.mock import ANY, MagicMock, PropertyMock, patch
76

@@ -71,7 +70,8 @@ def test_sigv4_exporter_init_valid_cw_otlp_endpoint(self, session_mock):
7170

7271
mock_session.get_available_regions.assert_called_once_with("xray")
7372

74-
# Tests that the exporter constructor behavior is set by OTLP protobuf/http Span Exporter
73+
# Tests that the exporter constructor behavior
74+
# is set by OTLP protobuf/http Span Exporter
7575
# if an invalid OTLP CloudWatch endpoint is set
7676
@patch("botocore.session.Session")
7777
def test_sigv4_exporter_init_invalid_cw_otlp_endpoint(self, botocore_mock):
@@ -89,8 +89,9 @@ def test_sigv4_exporter_init_invalid_cw_otlp_endpoint(self, botocore_mock):
8989

9090
self.assertIsNone(exporter._aws_region)
9191

92-
# Tests that if the OTLP endpoint is not a valid CW endpoint but the credentials are valid, SigV4 authentication method is NOT called and
93-
# is NOT injected into the existing Session headers.
92+
# Tests that if the OTLP endpoint is not a valid CW endpoint but the credentials are valid,
93+
# SigV4 authentication method is NOT called and is
94+
# NOT injected into the existing Session headers.
9495
@patch("botocore.session.Session.get_available_regions")
9596
@patch("requests.Session.post")
9697
@patch("botocore.auth.SigV4Auth.add_auth")
@@ -153,8 +154,9 @@ def test_sigv4_exporter_export_does_not_add_sigv4_if_not_valid_cw_endpoint(
153154
cert=ANY,
154155
)
155156

156-
# Tests that if the OTLP endpoint is a valid CW endpoint but no credentials are returned, SigV4 authentication method is NOT called and
157-
# is NOT injected into the existing Session headers.
157+
# Tests that if the OTLP endpoint is a valid
158+
# CW endpoint but no credentials are returned,
159+
# SigV4 authentication method is NOT called and is NOT injected into the existing Session headers.
158160
@patch("botocore.session.Session")
159161
@patch("requests.Session")
160162
@patch("botocore.auth.SigV4Auth.add_auth")
@@ -198,7 +200,8 @@ def test_sigv4_exporter_export_does_not_add_sigv4_if_not_valid_credentials(
198200
self.assertNotIn(X_AMZ_DATE_HEADER, actual_headers)
199201
self.assertNotIn(X_AMZ_SECURITY_TOKEN_HEADER, actual_headers)
200202

201-
# Tests that if the OTLP endpoint is valid and credentials are valid, SigV4 authentication method is called and
203+
# Tests that if the OTLP endpoint is valid
204+
# and credentials are valid, SigV4 authentication method is called and
202205
# is injected into the existing Session headers.
203206
@patch("botocore.session.Session")
204207
@patch("requests.Session")

0 commit comments

Comments
 (0)