Skip to content

Commit 7c5ed8b

Browse files
committed
update tests
1 parent 1589371 commit 7c5ed8b

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

tests/integrations/django/test_tasks.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ def test_task_span_is_created(sentry_init, capture_events, immediate_backend):
7171
span for span in event["spans"] if span["op"] == OP.QUEUE_SUBMIT_DJANGO
7272
]
7373
assert len(queue_submit_spans) == 1
74-
assert queue_submit_spans[0]["description"] == "simple_task"
74+
assert (
75+
queue_submit_spans[0]["description"]
76+
== "tests.integrations.django.test_tasks.simple_task"
77+
)
7578
assert queue_submit_spans[0]["origin"] == "auto.http.django"
7679

7780

@@ -114,7 +117,10 @@ def test_task_enqueue_with_kwargs(sentry_init, immediate_backend, capture_events
114117
span for span in event["spans"] if span["op"] == OP.QUEUE_SUBMIT_DJANGO
115118
]
116119
assert len(queue_submit_spans) == 1
117-
assert queue_submit_spans[0]["description"] == "greet"
120+
assert (
121+
queue_submit_spans[0]["description"]
122+
== "tests.integrations.django.test_tasks.greet"
123+
)
118124

119125

120126
@pytest.mark.skipif(
@@ -145,7 +151,10 @@ def test_task_error_reporting(sentry_init, immediate_backend, capture_events):
145151
if span["op"] == OP.QUEUE_SUBMIT_DJANGO
146152
]
147153
assert len(queue_submit_spans) == 1
148-
assert queue_submit_spans[0]["description"] == "failing_task"
154+
assert (
155+
queue_submit_spans[0]["description"]
156+
== "tests.integrations.django.test_tasks.failing_task"
157+
)
149158

150159

151160
@pytest.mark.skipif(
@@ -174,5 +183,5 @@ def test_multiple_task_enqueues_create_multiple_spans(
174183
assert len(queue_submit_spans) == 3
175184

176185
span_names = [span["description"] for span in queue_submit_spans]
177-
assert span_names.count("task_one") == 2
178-
assert span_names.count("task_two") == 1
186+
assert span_names.count("tests.integrations.django.test_tasks.task_one") == 2
187+
assert span_names.count("tests.integrations.django.test_tasks.task_two") == 1

0 commit comments

Comments
 (0)