Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5bc4f60

Browse files
Apply suggestions from code review
Co-Authored-By: Mauricio Vásquez <[email protected]>
1 parent 03ea072 commit 5bc4f60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opentelemetry-api/tests/trace/propagation/test_tracecontexthttptextformat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_no_traceparent_header(self):
4747
"""
4848
output = {} # type:typing.Dict[str, typing.List[str]]
4949
span = get_span_from_context(FORMAT.extract(get_as_list, output))
50-
self.assertTrue(isinstance(span.get_context(), trace.SpanContext))
50+
self.assertIsInstance(span.get_context(), trace.SpanContext)
5151

5252
def test_headers_with_tracestate(self):
5353
"""When there is a traceparent and tracestate header, data from
@@ -188,7 +188,7 @@ def test_propagate_invalid_context(self):
188188
"""Do not propagate invalid trace context."""
189189
output = {} # type:typing.Dict[str, str]
190190
ctx = set_span_in_context(
191-
trace.DefaultSpan(trace.INVALID_SPAN_CONTEXT)
191+
trace.INVALID_SPAN
192192
)
193193
FORMAT.inject(dict.__setitem__, output, context=ctx)
194194
self.assertFalse("traceparent" in output)

0 commit comments

Comments
 (0)