Skip to content

Commit 30ff193

Browse files
committed
Fix test with multiple destionations
1 parent ff36584 commit 30ff193

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_celery_ping.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,18 @@ def test_check_status_reports_destinations(
160160
{"celery2@4cc150a7b49b": CeleryPingHealthCheck.CORRECT_PING_RESPONSE},
161161
{"celery3@4cc150a7b49b": CeleryPingHealthCheck.CORRECT_PING_RESPONSE},
162162
],
163+
), patch(
164+
self.CELERY_APP_CONTROL_INSPECT_ACTIVE_QUEUES,
165+
return_value={
166+
celery_worker: [
167+
{"name": queue.name} for queue in settings.CELERY_QUEUES
168+
]
169+
for celery_worker in ("celery1@4cc150a7b49b", "celery2@4cc150a7b49b", "celery3@4cc150a7b49b")
170+
},
163171
):
164172
health_check.check_status()
165173

166-
assert len(health_check.errors) == 1
174+
assert not health_check.errors
167175

168176

169177
class TestCeleryPingHealthCheckApps:

0 commit comments

Comments
 (0)