From 41bf12e56e2fceebf6d74a5def64a0d60bff4774 Mon Sep 17 00:00:00 2001 From: Eugene <54681898+jimf5@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:00:37 -0800 Subject: [PATCH] Add more checkes to get_span. Co-authored-by: p-pautov <37922380+p-pautov@users.noreply.github.com> --- tests/trace_service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/trace_service.py b/tests/trace_service.py index 291a984d..47e477db 100644 --- a/tests/trace_service.py +++ b/tests/trace_service.py @@ -23,7 +23,10 @@ def get_batch(self): return self.batches.pop() def get_span(self): - return self.get_batch()[0].scope_spans[0].spans.pop() + batch = self.get_batch() + assert len(batch.scope_spans) == 1 + assert len(batch.scope_spans[0].spans) == 1 + return batch.scope_spans[0].spans.pop() @pytest.fixture(scope="module")