From 81ba7a1e40d9921c70de7b5c9c636c9b14dffc29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20H=C3=B6nig?= Date: Sun, 25 Feb 2018 17:52:38 -0500 Subject: [PATCH] Mark DigestWorker and PushNotificationsWorker as nocoverage. These two classes are tricky to test, and nocoverage-ing them allows us to mark queue_processors.py as fully covered. We still want to cover these two workers at some point, but for now, it's nice to enforce full coverage for any future changes to queue_processors.py. Fixes (sort of) #6542. --- tools/test-backend | 1 + zerver/worker/queue_processors.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/test-backend b/tools/test-backend index 661b80c1ea..c1aafa9e6a 100755 --- a/tools/test-backend +++ b/tools/test-backend @@ -37,6 +37,7 @@ target_fully_covered = {path for target in [ # Once we have a nice negative tests system, we can add these: # 'zerver/webhooks/*/*.py', # 'zerver/webhooks/*/*/*.py', + 'zerver/worker/queue_processor.py', ] for path in glob.glob(target)} not_yet_fully_covered = { diff --git a/zerver/worker/queue_processors.py b/zerver/worker/queue_processors.py index f5fbd6448f..e28fb821a7 100644 --- a/zerver/worker/queue_processors.py +++ b/zerver/worker/queue_processors.py @@ -322,7 +322,7 @@ class MissedMessageSendingWorker(EmailSendingWorker): # nocoverage pass @assign_queue('missedmessage_mobile_notifications') -class PushNotificationsWorker(QueueProcessingWorker): +class PushNotificationsWorker(QueueProcessingWorker): # nocoverage def consume(self, data): # type: (Mapping[str, Any]) -> None handle_push_notification(data['user_profile_id'], data) @@ -430,7 +430,7 @@ class MessageSenderWorker(QueueProcessingWorker): respond_send_message) @assign_queue('digest_emails') -class DigestWorker(QueueProcessingWorker): +class DigestWorker(QueueProcessingWorker): # nocoverage # Who gets a digest is entirely determined by the enqueue_digest_emails # management command, not here. def consume(self, event):