From 32ef97156dc1179c8c06126743132b7134d03dfe Mon Sep 17 00:00:00 2001 From: Devin Gaffney Date: Wed, 13 Nov 2024 14:31:51 -0800 Subject: [PATCH] initial tweaks on mocks --- test/lib/queue/test_processor.py | 2 +- test/lib/queue/test_queue.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lib/queue/test_processor.py b/test/lib/queue/test_processor.py index c6b5a24d..0294a1f9 100644 --- a/test/lib/queue/test_processor.py +++ b/test/lib/queue/test_processor.py @@ -16,7 +16,7 @@ def setUp(self, mock_get_env_setting, mock_boto_resource): self.mock_sqs_resource = MagicMock() self.mock_input_queue = MagicMock() self.mock_input_queue.url = "http://queue/mean_tokens__Model" - self.mock_sqs_resource.queues.filter.return_value = [self.mock_input_queue] + self.mock_sqs_resource.get_queue_by_name.return_value = self.mock_input_queue mock_boto_resource.return_value = self.mock_sqs_resource # Initialize the QueueProcessor instance diff --git a/test/lib/queue/test_queue.py b/test/lib/queue/test_queue.py index f166a78b..66848ef4 100644 --- a/test/lib/queue/test_queue.py +++ b/test/lib/queue/test_queue.py @@ -49,7 +49,7 @@ def setUp(self, mock_log_execution_time, mock_get_env_setting, mock_boto_resourc self.mock_dlq_queue = MagicMock() self.mock_dlq_queue.url = f"http://queue/{self.queue_name_dlq}" self.mock_dlq_queue.attributes = {"QueueArn": f"queue:{self.queue_name_dlq}"} - self.mock_sqs_resource.queues.filter.return_value = [self.mock_input_queue, self.mock_output_queue, self.mock_dlq_queue] + self.mock_sqs_resource.get_queue_by_name.return_value = self.mock_input_queue#[, self.mock_output_queue, self.mock_dlq_queue] mock_boto_resource.return_value = self.mock_sqs_resource # Initialize the QueueWorker instance