fix: update content reported notification (#35315)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user