def test_parse_span_path(): expected = { "project": "octopus", "trace": "oyster", "span": "nudibranch", } path = TraceServiceClient.span_path(**expected) # Check that the path construction is reversible. actual = TraceServiceClient.parse_span_path(path) assert expected == actual
def test_span_path(): project = "squid" trace = "clam" span = "whelk" expected = "projects/{project}/traces/{trace}/spans/{span}".format( project=project, trace=trace, span=span, ) actual = TraceServiceClient.span_path(project, trace, span) assert expected == actual