diff --git a/opentelemetry-api/tests/context/propagation/test_tracecontexthttptextformat.py b/opentelemetry-api/tests/context/propagation/test_tracecontexthttptextformat.py index c39fd3182ca..8f283ef8819 100644 --- a/opentelemetry-api/tests/context/propagation/test_tracecontexthttptextformat.py +++ b/opentelemetry-api/tests/context/propagation/test_tracecontexthttptextformat.py @@ -180,7 +180,7 @@ def test_format_not_supported(self): def test_propagate_invalid_context(self): """Do not propagate invalid trace context.""" output = {} # type:typing.Dict[str, str] - FORMAT.inject(trace.Span(), dict.__setitem__, output) + FORMAT.inject(trace.INVALID_SPAN, dict.__setitem__, output) self.assertFalse("traceparent" in output) def test_tracestate_empty_header(self):