Skip to content

Commit

Permalink
fix: Update openedx_events/apps.py
Browse files Browse the repository at this point in the history
Co-authored-by: Arunmozhi <[email protected]>
  • Loading branch information
navinkarkera and tecoholic committed Jul 24, 2023
1 parent d466aef commit b991f04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion openedx_events/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _ensure_signal_config_format(self, event_type, configurations):
Raises:
ProducerConfigurationError: If configuration is not valid.
"""
if type(configurations) not in (list, tuple):
if not isinstance(configurations, list) and not isinstance(configurations, tuple):
raise ProducerConfigurationError(
event_type=event_type,
message="Configuration for event_types should be a list or a tuple of dictionaries"
Expand Down
2 changes: 1 addition & 1 deletion openedx_events/tests/test_producer_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_configuration_is_validated(self):
apps.get_app_config("openedx_events").ready()

with override_settings(EVENT_BUS_PRODUCER_CONFIG={"type": ""}):
with pytest.raises(ProducerConfigurationError, match="should be list or tuple"):
with pytest.raises(ProducerConfigurationError, match="should be a list or a tuple"):
apps.get_app_config("openedx_events").ready()

with override_settings(EVENT_BUS_PRODUCER_CONFIG={"type": [""]}):
Expand Down

0 comments on commit b991f04

Please sign in to comment.