@@ -22,7 +22,7 @@ def setUp(self):
22
22
)
23
23
self .env_patcher .start ()
24
24
25
- @patch ("boto3.client " )
25
+ @patch ("botocore.session.Session.create_client " )
26
26
def test_secrets_manager_fips_endpoint (self , mock_boto3_client ):
27
27
mock_client = MagicMock ()
28
28
mock_client .get_secret_value .return_value = {"SecretString" : "test-api-key" }
@@ -42,7 +42,7 @@ def test_secrets_manager_fips_endpoint(self, mock_boto3_client):
42
42
)
43
43
self .assertEqual (api_key , "test-api-key" )
44
44
45
- @patch ("boto3.client " )
45
+ @patch ("botocore.session.Session.create_client " )
46
46
def test_secrets_manager_different_region (self , mock_boto3_client ):
47
47
mock_client = MagicMock ()
48
48
mock_client .get_secret_value .return_value = {"SecretString" : "test-api-key" }
@@ -62,7 +62,7 @@ def test_secrets_manager_different_region(self, mock_boto3_client):
62
62
)
63
63
self .assertEqual (api_key , "test-api-key" )
64
64
65
- @patch ("boto3.client " )
65
+ @patch ("botocore.session.Session.create_client " )
66
66
def test_ssm_fips_endpoint (self , mock_boto3_client ):
67
67
mock_client = MagicMock ()
68
68
mock_client .get_parameter .return_value = {
@@ -80,7 +80,7 @@ def test_ssm_fips_endpoint(self, mock_boto3_client):
80
80
)
81
81
self .assertEqual (api_key , "test-api-key" )
82
82
83
- @patch ("boto3.client " )
83
+ @patch ("botocore.session.Session.create_client " )
84
84
@patch ("datadog_lambda.api.decrypt_kms_api_key" )
85
85
def test_kms_fips_endpoint (self , mock_decrypt_kms , mock_boto3_client ):
86
86
mock_client = MagicMock ()
@@ -97,7 +97,7 @@ def test_kms_fips_endpoint(self, mock_decrypt_kms, mock_boto3_client):
97
97
)
98
98
self .assertEqual (api_key , "test-api-key" )
99
99
100
- @patch ("boto3.client " )
100
+ @patch ("botocore.session.Session.create_client " )
101
101
def test_no_fips_for_standard_regions (self , mock_boto3_client ):
102
102
mock_client = MagicMock ()
103
103
mock_client .get_secret_value .return_value = {"SecretString" : "test-api-key" }
0 commit comments