Skip to content

Commit

Permalink
test: fixed failed test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ayesha-waris committed Jan 30, 2024
1 parent 93e944f commit 4eaca76
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lms/djangoapps/teams/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,11 @@ def test_signals(self, signal_name, user_should_update):
user = getattr(self, user)
with patch('lms.djangoapps.discussion.rest_api.tasks.send_response_notifications.apply_async'):
with patch('lms.djangoapps.discussion.rest_api.tasks.send_thread_created_notification.apply_async'):
signal = self.SIGNALS[signal_name]
signal.send(sender=None, user=user, post=self.mock_comment())
with patch(
'lms.djangoapps.discussion.rest_api.tasks.send_response_endorsed_notifications.apply_async'
):
signal = self.SIGNALS[signal_name]
signal.send(sender=None, user=user, post=self.mock_comment())

@ddt.data('thread_voted', 'comment_voted')
def test_vote_others_post(self, signal_name):
Expand All @@ -339,5 +342,8 @@ def test_signals_course_context(self, signal_name):
with self.assert_last_activity_updated(False):
with patch('lms.djangoapps.discussion.rest_api.tasks.send_response_notifications.apply_async'):
with patch('lms.djangoapps.discussion.rest_api.tasks.send_thread_created_notification.apply_async'):
signal = self.SIGNALS[signal_name]
signal.send(sender=None, user=self.user, post=self.mock_comment(context='course'))
with patch(
'lms.djangoapps.discussion.rest_api.tasks.send_response_endorsed_notifications.apply_async'
):
signal = self.SIGNALS[signal_name]
signal.send(sender=None, user=self.user, post=self.mock_comment(context='course'))

0 comments on commit 4eaca76

Please sign in to comment.