Skip to content

Commit

Permalink
ensure all signals to be called
Browse files Browse the repository at this point in the history
  • Loading branch information
ivellios committed Sep 22, 2023
1 parent a34d95a commit 714f5bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_receivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ class SenderMock:
pass


@override_settings(
CELERY_TASK_ALWAYS_EAGER=True, EVENT_SIGNALS_CELERY_APP="tests.testapp.celery.app"
)
def test_celery_signal_receiver():
signal = UnifiedSignal(DataMock)

@receiver_task(signal)
@receiver_task(signal, weak=False)
def handle_signal(**kwargs):
assert True

Expand All @@ -37,7 +40,7 @@ def test_celery_signal_receiver_creates_celery_task():

with mock.patch("tests.testapp.celery.app.register_task") as task_mock:

@receiver_task(signal)
@receiver_task(signal, weak=False)
def handle_signal(**kwargs):
...

Expand Down

0 comments on commit 714f5bc

Please sign in to comment.