Add test to validate propagator fields method (#228)

This commit is contained in:
(Eliseo) Nathaniel Ruiz Nowell 2020-12-03 16:53:06 -08:00 committed by GitHub
parent f71bc2b79e
commit 70b425a588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -153,6 +153,21 @@ class AwsXRayPropagatorTest(unittest.TestCase):
self.assertEqual(injected_items, expected_items)
def test_inject_reported_fields_matches_carrier_fields(self):
carrier = CaseInsensitiveDict()
AwsXRayPropagatorTest.XRAY_PROPAGATOR.inject(
AwsXRayPropagatorTest.carrier_setter,
carrier,
build_test_current_context(),
)
injected_keys = set(carrier.keys())
self.assertEqual(
injected_keys, AwsXRayPropagatorTest.XRAY_PROPAGATOR.fields()
)
# Extract Tests
def test_extract_empty_carrier_from_invalid_context(self):