-
-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: boxes/model/ui: Show recipient names along with emails in PMs.
Currently, PM narrows only display the delivery emails of the users. This commit modifies the to_write_box to also display the names of the users along with their emails. This commit also tidies up the private_box_view() method by typing emails as List[str], and updating the corresponding calls. The get_invalid_recipient_emails() method in model.py has been modified and renamed to get_invalid_recipients() to validate the combination of the recipient's name and email. Tests updated.
- Loading branch information
Showing
6 changed files
with
58 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1318,7 +1318,7 @@ def test_private_message_to_self(self, mocker): | |
mocker.patch.object(MessageBox, 'main_view') | ||
msg_box = MessageBox(message, self.model, None) | ||
|
||
assert msg_box.recipients_emails == '[email protected]' | ||
assert msg_box.recipient_emails == ['[email protected]'] | ||
msg_box._is_private_message_to_self.assert_called_once_with() | ||
|
||
@pytest.mark.parametrize('content, markup', [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters