fix: update content reported notification (#35315)

This commit is contained in:
Eemaan Amir
2024-08-16 14:20:33 +05:00
committed by GitHub
parent 11de2a4055
commit ca46c20abb
3 changed files with 4 additions and 2 deletions

View File

@@ -1458,6 +1458,8 @@ class CreateSubCommentUnicodeTestCase(
@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

View File

@@ -314,7 +314,7 @@ class DiscussionNotificationSender:
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
}

View File

@@ -44,7 +44,7 @@ class TestDiscussionNotificationSender(unittest.TestCase):
self.assertEqual(notification_type, "content_reported")
self.assertEqual(context, {
'username': 'test_user',
'username': self.thread.username,
'content_type': expected_content_type,
'content': 'Thread body'
})