Skip to content

Commit

Permalink
Recursive broadcast test fix (#1557)
Browse files Browse the repository at this point in the history
* Recursive broadcast fix

* Recursive broadcast test case fix

* Recursive broadcast test case fix

* Recursive broadcast test case fix

* Recursive broadcast test case fix

* Recursive broadcast test case fix

* Recursive broadcast test case fix
  • Loading branch information
maheshsattala authored Oct 1, 2024
1 parent 1ae9ba3 commit 9579f4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions kairon/shared/chat/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class MessageBroadcastRequest(BaseModel):
scheduler_config: SchedulerConfiguration = None
recipients_config: RecipientsConfiguration = None
template_config: List[TemplateConfiguration] = None
template_name: str = None
language_code: str = None
pyscript: str = None

@root_validator
Expand Down
4 changes: 1 addition & 3 deletions tests/unit_test/events/scheduler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ def test_add_schedule(self, mock_add_job, mock_scheduler, mock_collection):
assert args[2]

assert args[3][0] == 'message_broadcast'
assert args[3][1] == 'Event'
assert args[3][2] == {'bot': 'test_bot', 'user': 'test_user', 'event_id': event_id}

assert args[3][1] == {'bot': 'test_bot', 'user': 'test_user', 'event_id': event_id}

@patch("apscheduler.schedulers.background.BackgroundScheduler.get_jobs", autospec=True)
@patch("apscheduler.schedulers.background.BackgroundScheduler.start", autospec=True)
Expand Down

0 comments on commit 9579f4f

Please sign in to comment.