Skip to content

Commit

Permalink
fix: update content reported notification (#35315)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemaanamir authored Aug 16, 2024
1 parent 11de2a4 commit ca46c20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lms/djangoapps/discussion/django_comment_client/base/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,8 @@ def _test_unicode_data(self, text, mock_request):
@disable_signal(views, 'comment_created')
@disable_signal(views, 'comment_voted')
@disable_signal(views, 'comment_deleted')
@disable_signal(views, 'comment_flagged')
@disable_signal(views, 'thread_flagged')
class TeamsPermissionsTestCase(ForumsEnableMixin, UrlResetMixin, SharedModuleStoreTestCase, MockRequestSetupMixin):
# Most of the test points use the same ddt data.
# args: user, commentable_id, status_code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def send_reported_content_notification(self):
content_type = thread_types[self.thread.type][getattr(self.thread, 'depth', 0)]

context = {
'username': self.creator.username,
'username': self.thread.username,
'content_type': content_type,
'content': thread_body
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _assert_send_notification_called_with(self, mock_send_notification, expected

self.assertEqual(notification_type, "content_reported")
self.assertEqual(context, {
'username': 'test_user',
'username': self.thread.username,
'content_type': expected_content_type,
'content': 'Thread body'
})
Expand Down

0 comments on commit ca46c20

Please sign in to comment.