-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group message data #1537
base: main
Are you sure you want to change the base?
Group message data #1537
Changes from 1 commit
15a7c86
c734d2a
e316327
9e5036e
9051d4f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -503,19 +503,13 @@ def mock_external_classes(self, mocker: MockerFixture, msg_box: MessageBox) -> N | |
self.full_rendered_message = FullRenderedMsgView( | ||
controller=self.controller, | ||
message=self.message, | ||
topic_links=OrderedDict(), | ||
message_links=OrderedDict(), | ||
time_mentions=list(), | ||
title="Full Rendered Message", | ||
) | ||
|
||
def test_init(self, msg_box: MessageBox) -> None: | ||
assert self.full_rendered_message.title == "Full Rendered Message" | ||
assert self.full_rendered_message.controller == self.controller | ||
assert self.full_rendered_message.message == self.message | ||
assert self.full_rendered_message.topic_links == OrderedDict() | ||
assert self.full_rendered_message.message_links == OrderedDict() | ||
assert self.full_rendered_message.time_mentions == list() | ||
assert self.full_rendered_message.header.widget_list == msg_box.header | ||
assert self.full_rendered_message.footer.widget_list == msg_box.footer | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re the commit text for the 'stack' change, my only nit would be re the end of the 'why stack popups' that, we don't need to pass the entire data around... unless we need it :) None of these now do, but as per discussion there are upcoming PRs that will do so. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, is that so? I can't seem to recall that discussion. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've not rechecked, but was likely referring to Sashank's comment here, where he is expecting this will be necessary for spoilers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, that's covered by this PR. Won't need to pass around any data for that. |
||
|
@@ -574,19 +568,13 @@ def mock_external_classes(self, mocker: MockerFixture, msg_box: MessageBox) -> N | |
self.full_raw_message = FullRawMsgView( | ||
controller=self.controller, | ||
message=self.message, | ||
topic_links=OrderedDict(), | ||
message_links=OrderedDict(), | ||
time_mentions=list(), | ||
title="Full Raw Message", | ||
) | ||
|
||
def test_init(self, msg_box: MessageBox) -> None: | ||
assert self.full_raw_message.title == "Full Raw Message" | ||
assert self.full_raw_message.controller == self.controller | ||
assert self.full_raw_message.message == self.message | ||
assert self.full_raw_message.topic_links == OrderedDict() | ||
assert self.full_raw_message.message_links == OrderedDict() | ||
assert self.full_raw_message.time_mentions == list() | ||
assert self.full_raw_message.header.widget_list == msg_box.header | ||
assert self.full_raw_message.footer.widget_list == msg_box.footer | ||
|
||
|
@@ -644,18 +632,12 @@ def mock_external_classes(self, mocker: MockerFixture) -> None: | |
self.edit_history_view = EditHistoryView( | ||
controller=self.controller, | ||
message=self.message, | ||
topic_links=OrderedDict(), | ||
message_links=OrderedDict(), | ||
time_mentions=list(), | ||
title="Edit History", | ||
) | ||
|
||
def test_init(self) -> None: | ||
assert self.edit_history_view.controller == self.controller | ||
assert self.edit_history_view.message == self.message | ||
assert self.edit_history_view.topic_links == OrderedDict() | ||
assert self.edit_history_view.message_links == OrderedDict() | ||
assert self.edit_history_view.time_mentions == list() | ||
self.controller.model.fetch_message_history.assert_called_once_with( | ||
message_id=self.message["id"], | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Removing dead/unnecessary code is a refactor - it shouldn't change the behavior :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, thank you!