From 26f8ff7f5353180b583eba6b30689be8cb862027 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Thu, 13 Apr 2023 15:55:31 +0200 Subject: [PATCH] Fix failing SQS tests on moto upgrade The new moto (4.1.7) performs additional validation on the queues created during tests and it failes the tests when content deduplication is not specified. Explicit setting the deduplication mode, fixes the problem and allows the new moto to be installed. --- tests/providers/amazon/aws/operators/test_sqs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/providers/amazon/aws/operators/test_sqs.py b/tests/providers/amazon/aws/operators/test_sqs.py index 327d47c6135c4..1cbe9a1d9689a 100644 --- a/tests/providers/amazon/aws/operators/test_sqs.py +++ b/tests/providers/amazon/aws/operators/test_sqs.py @@ -87,7 +87,9 @@ def test_execute_failure_fifo_queue(self): def test_execute_success_fifo_queue(self): self.operator.sqs_queue = FIFO_QUEUE_URL self.operator.message_group_id = "abc" - self.sqs_hook.create_queue(FIFO_QUEUE_NAME, attributes={"FifoQueue": "true"}) + self.sqs_hook.create_queue( + FIFO_QUEUE_NAME, attributes={"FifoQueue": "true", "ContentBasedDeduplication": "true"} + ) result = self.operator.execute(self.mock_context) assert "MD5OfMessageBody" in result assert "MessageId" in result