1
1
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
# SPDX-License-Identifier: Apache-2.0
3
- from typing import List , Optional
3
+ from typing import Dict , List , Optional
4
4
from unittest import TestCase
5
5
from unittest .mock import MagicMock
6
6
@@ -117,7 +117,7 @@ def test_local_root_server_span(self):
117
117
self .parent_span_context .is_valid = False
118
118
self .span_mock .name = _SPAN_NAME_VALUE
119
119
120
- expected_attributes_map : dict [str , BoundedAttributes ] = {
120
+ expected_attributes_map : Dict [str , BoundedAttributes ] = {
121
121
SERVICE_METRIC : {
122
122
AWS_SPAN_KIND : _LOCAL_ROOT ,
123
123
AWS_LOCAL_SERVICE : _SERVICE_NAME_VALUE ,
@@ -126,7 +126,7 @@ def test_local_root_server_span(self):
126
126
}
127
127
128
128
self .span_mock .kind = SpanKind .SERVER
129
- actual_attributes_map : dict [str , BoundedAttributes ] = _GENERATOR .generate_metric_attributes_dict_from_span (
129
+ actual_attributes_map : Dict [str , BoundedAttributes ] = _GENERATOR .generate_metric_attributes_dict_from_span (
130
130
self .span_mock , self .resource
131
131
)
132
132
self .assertEqual (actual_attributes_map , expected_attributes_map )
@@ -136,7 +136,7 @@ def test_local_root_internal_span(self):
136
136
self .parent_span_context .is_valid = False
137
137
self .span_mock .name = _SPAN_NAME_VALUE
138
138
139
- expected_attributes_map : dict [str , BoundedAttributes ] = {
139
+ expected_attributes_map : Dict [str , BoundedAttributes ] = {
140
140
SERVICE_METRIC : {
141
141
AWS_SPAN_KIND : _LOCAL_ROOT ,
142
142
AWS_LOCAL_SERVICE : _SERVICE_NAME_VALUE ,
@@ -145,7 +145,7 @@ def test_local_root_internal_span(self):
145
145
}
146
146
147
147
self .span_mock .kind = SpanKind .INTERNAL
148
- actual_attributes_map : dict [str , BoundedAttributes ] = _GENERATOR .generate_metric_attributes_dict_from_span (
148
+ actual_attributes_map : Dict [str , BoundedAttributes ] = _GENERATOR .generate_metric_attributes_dict_from_span (
149
149
self .span_mock , self .resource
150
150
)
151
151
self .assertEqual (actual_attributes_map , expected_attributes_map )
@@ -158,7 +158,7 @@ def test_local_root_client_span(self):
158
158
[AWS_REMOTE_SERVICE , AWS_REMOTE_OPERATION ], [_AWS_REMOTE_SERVICE_VALUE , _AWS_REMOTE_OPERATION_VALUE ]
159
159
)
160
160
161
- expected_attributes_map : dict [str , BoundedAttributes ] = {
161
+ expected_attributes_map : Dict [str , BoundedAttributes ] = {
162
162
SERVICE_METRIC : {
163
163
AWS_SPAN_KIND : _LOCAL_ROOT ,
164
164
AWS_LOCAL_SERVICE : _SERVICE_NAME_VALUE ,
@@ -174,7 +174,7 @@ def test_local_root_client_span(self):
174
174
}
175
175
176
176
self .span_mock .kind = SpanKind .CLIENT
177
- actual_attributes_map : dict [str , BoundedAttributes ] = _GENERATOR .generate_metric_attributes_dict_from_span (
177
+ actual_attributes_map : Dict [str , BoundedAttributes ] = _GENERATOR .generate_metric_attributes_dict_from_span (
178
178
self .span_mock , self .resource
179
179
)
180
180
self .assertEqual (actual_attributes_map , expected_attributes_map )
@@ -187,7 +187,7 @@ def test_local_root_consumer_span(self):
187
187
[AWS_REMOTE_SERVICE , AWS_REMOTE_OPERATION ], [_AWS_REMOTE_SERVICE_VALUE , _AWS_REMOTE_OPERATION_VALUE ]
188
188
)
189
189
190
- expected_attributes_map : dict [str , BoundedAttributes ] = {
190
+ expected_attributes_map : Dict [str , BoundedAttributes ] = {
191
191
SERVICE_METRIC : {
192
192
AWS_SPAN_KIND : _LOCAL_ROOT ,
193
193
AWS_LOCAL_SERVICE : _SERVICE_NAME_VALUE ,
@@ -203,7 +203,7 @@ def test_local_root_consumer_span(self):
203
203
}
204
204
205
205
self .span_mock .kind = SpanKind .CONSUMER
206
- actual_attributes_map : dict [str , BoundedAttributes ] = _GENERATOR .generate_metric_attributes_dict_from_span (
206
+ actual_attributes_map : Dict [str , BoundedAttributes ] = _GENERATOR .generate_metric_attributes_dict_from_span (
207
207
self .span_mock , self .resource
208
208
)
209
209
self .assertEqual (actual_attributes_map , expected_attributes_map )
@@ -216,7 +216,7 @@ def test_local_root_producer_span(self):
216
216
[AWS_REMOTE_SERVICE , AWS_REMOTE_OPERATION ], [_AWS_REMOTE_SERVICE_VALUE , _AWS_REMOTE_OPERATION_VALUE ]
217
217
)
218
218
219
- expected_attributes_map : dict [str , BoundedAttributes ] = {
219
+ expected_attributes_map : Dict [str , BoundedAttributes ] = {
220
220
SERVICE_METRIC : {
221
221
AWS_SPAN_KIND : _LOCAL_ROOT ,
222
222
AWS_LOCAL_SERVICE : _SERVICE_NAME_VALUE ,
@@ -232,7 +232,7 @@ def test_local_root_producer_span(self):
232
232
}
233
233
234
234
self .span_mock .kind = SpanKind .PRODUCER
235
- actual_attributes_map : dict [str , BoundedAttributes ] = _GENERATOR .generate_metric_attributes_dict_from_span (
235
+ actual_attributes_map : Dict [str , BoundedAttributes ] = _GENERATOR .generate_metric_attributes_dict_from_span (
236
236
self .span_mock , self .resource
237
237
)
238
238
self .assertEqual (actual_attributes_map , expected_attributes_map )
0 commit comments