Skip to content

Commit 3c90aa0

Browse files
committed
assertions
1 parent dd6bad0 commit 3c90aa0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/integrations/celery/test_celery.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,11 @@ def test_simple(capture_events, celery, celery_invocation, custom_celery_task_cl
105105

106106
if custom_celery_task_cls:
107107

108+
custom_calls = []
109+
108110
class CustomTask(celery.Task):
109111
def __call__(self, *args, **kwargs):
112+
custom_calls.append(1)
110113
return self.run(*args, **kwargs)
111114

112115
celery.Task = CustomTask
@@ -122,6 +125,8 @@ def dummy_task(x, y):
122125
celery_invocation(dummy_task, 1, 2)
123126
_, expected_context = celery_invocation(dummy_task, 1, 0)
124127

128+
assert not custom_celery_task_cls or custom_calls
129+
125130
(event,) = events
126131

127132
assert event["contexts"]["trace"]["trace_id"] == transaction.trace_id

0 commit comments

Comments
 (0)