Skip to content

Commit c532190

Browse files
linting
1 parent 7ad64c5 commit c532190

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

tests/test_tracing.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -623,38 +623,40 @@ def test_with_complete_datadog_trace_headers_with_trigger_tags(self):
623623

624624
def test_request_header_malformed(self):
625625
"""Testing that if a RUM AppSync event is malformed, the tracer will attempt
626-
to get the trace context from the lambda context in the
626+
to get the trace context from the lambda context in the
627627
extract_context_from_request_header_or_context function."""
628628
lambda_ctx = get_mock_context()
629-
lambda_ctx.client_context = ClientContext(custom={
630-
"_datadog": {
631-
"x-datadog-parent-id": "67890",
632-
"x-datadog-sampling-priority": "1",
633-
"x-datadog-trace-id": "12345",
634-
}})
629+
lambda_ctx.client_context = ClientContext(
630+
custom={
631+
"_datadog": {
632+
"x-datadog-parent-id": "67890",
633+
"x-datadog-sampling-priority": "1",
634+
"x-datadog-trace-id": "12345",
635+
}
636+
}
637+
)
635638
request_header_event = {
636639
"identity": "None",
637640
"info": {
638641
"fieldName": "getItems",
639642
"parentTypeName": "Query",
640643
"selectionSetGraphQL": "{\n id\n}",
641-
"selectionSetList":["id"]
642-
},
644+
"selectionSetList": ["id"],
645+
},
643646
"prev": "None",
644647
"request": "hello",
645-
"source": "None"
648+
"source": "None",
646649
}
647650
ctx, source, _ = extract_dd_trace_context(request_header_event, lambda_ctx)
648651
expected_context = Context(
649-
trace_id = 12345,
650-
span_id = 67890,
651-
sampling_priority = 1,
652+
trace_id=12345,
653+
span_id=67890,
654+
sampling_priority=1,
652655
)
653656

654657
self.assertEqual(ctx, expected_context)
655658
self.assertEqual(source, "event")
656659

657-
658660
def _test_step_function_trace_data_common(
659661
self, event, expected_trace_id, expected_span_id, expected_tid
660662
):

0 commit comments

Comments
 (0)