@@ -84,7 +84,6 @@ def build_test_span_context(
84
84
85
85
86
86
class AwsXRayPropagatorTest (unittest .TestCase ):
87
- carrier_setter = CaseInsensitiveDict .__setitem__
88
87
XRAY_PROPAGATOR = AwsXRayFormat ()
89
88
90
89
# Inject Tests
@@ -93,7 +92,6 @@ def test_inject_into_non_sampled_context(self):
93
92
carrier = CaseInsensitiveDict ()
94
93
95
94
AwsXRayPropagatorTest .XRAY_PROPAGATOR .inject (
96
- AwsXRayPropagatorTest .carrier_setter ,
97
95
carrier ,
98
96
build_test_current_context (),
99
97
)
@@ -113,7 +111,6 @@ def test_inject_into_sampled_context(self):
113
111
carrier = CaseInsensitiveDict ()
114
112
115
113
AwsXRayPropagatorTest .XRAY_PROPAGATOR .inject (
116
- AwsXRayPropagatorTest .carrier_setter ,
117
114
carrier ,
118
115
build_test_current_context (
119
116
trace_flags = TraceFlags (TraceFlags .SAMPLED )
@@ -135,7 +132,6 @@ def test_inject_into_context_with_non_default_state(self):
135
132
carrier = CaseInsensitiveDict ()
136
133
137
134
AwsXRayPropagatorTest .XRAY_PROPAGATOR .inject (
138
- AwsXRayPropagatorTest .carrier_setter ,
139
135
carrier ,
140
136
build_test_current_context (
141
137
trace_state = TraceState ([("foo" , "bar" )])
@@ -158,7 +154,6 @@ def test_inject_reported_fields_matches_carrier_fields(self):
158
154
carrier = CaseInsensitiveDict ()
159
155
160
156
AwsXRayPropagatorTest .XRAY_PROPAGATOR .inject (
161
- AwsXRayPropagatorTest .carrier_setter ,
162
157
carrier ,
163
158
build_test_current_context (),
164
159
)
@@ -382,7 +377,7 @@ def test_fields(self, mock_trace):
382
377
383
378
mock_setter = Mock ()
384
379
385
- AwsXRayPropagatorTest .XRAY_PROPAGATOR .inject (mock_setter , {} )
380
+ AwsXRayPropagatorTest .XRAY_PROPAGATOR .inject ({}, setter = mock_setter )
386
381
387
382
inject_fields = set ()
388
383
0 commit comments