From 6dbd822ba7f78b9aef7d9b7c9950dff341abd099 Mon Sep 17 00:00:00 2001 From: Cristhian Garcia Date: Mon, 12 Feb 2024 10:10:51 -0500 Subject: [PATCH] chore: address suggestion --- openedx_events/apps.py | 2 +- openedx_events/tests/test_producer_config.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/openedx_events/apps.py b/openedx_events/apps.py index bf7a13d4..c054540b 100644 --- a/openedx_events/apps.py +++ b/openedx_events/apps.py @@ -24,7 +24,7 @@ def general_signal_handler(sender, signal, **kwargs): # pylint: disable=unused- # "topic_b": { "event_key_field": "my.key.field", "enabled": False } # }" if kwargs.get(SIGNAL_PROCESSED_FROM_EVENT_BUS) is True: - logger.info(f"Signal already processed on the Event Bus {signal.event_type}, skipping...") + logger.debug(f"Signal already processed on the Event Bus {signal.event_type}, skipping...") return event_data = {key: kwargs.get(key) for key in signal.init_data} diff --git a/openedx_events/tests/test_producer_config.py b/openedx_events/tests/test_producer_config.py index 68250566..af5349da 100644 --- a/openedx_events/tests/test_producer_config.py +++ b/openedx_events/tests/test_producer_config.py @@ -59,10 +59,12 @@ def test_enabled_disabled_events(self, mock_producer): @patch('openedx_events.apps.get_producer') def test_events_with_custom_metadata_disabled(self, mock_producer, mock_logger): """ - Check whether XBLOCK_PUBLISHED is connected to the handler and the handler only produces enabled events. + Check wheter XBLOCK_PUBLISHED is connected to the handler and the handler + do not send any events as the signal is marked "from_event_bus". Args: mock_producer: mock get_producer to inspect the arguments. + mock_logger: mock logger to inspect the arguments. """ mock_send = Mock() mock_producer.return_value = mock_send