Skip to content

Commit f1d5ef1

Browse files
committed
refactor: Replace '_private' with '_direct'.
1 parent 88200b7 commit f1d5ef1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/ui_tools/test_boxes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def test_not_calling_typing_method_to_oneself(
224224
)
225225

226226
@pytest.mark.parametrize("key", keys_for_command("SEND_MESSAGE"))
227-
def test_not_calling_send_private_message_without_recipients(
227+
def test_not_calling_send_direct_message_without_recipients(
228228
self,
229229
key: str,
230230
mocker: MockerFixture,

tests/ui_tools/test_messages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_init_fails_with_bad_message_type(self):
7171
with pytest.raises(RuntimeError):
7272
MessageBox(message, self.model, None)
7373

74-
def test_direct_message_to_self(self, mocker): # rebased
74+
def test_direct_message_to_self(self, mocker):
7575
message = dict(
7676
type="private",
7777
display_recipient=[
@@ -92,7 +92,7 @@ def test_direct_message_to_self(self, mocker): # rebased
9292
msg_box = MessageBox(message, self.model, None)
9393

9494
assert msg_box.recipient_emails == ["[email protected]"]
95-
msg_box._is_direct_message_to_self.assert_called_once_with() # rebased
95+
msg_box._is_direct_message_to_self.assert_called_once_with()
9696

9797
@pytest.mark.parametrize(
9898
"content, expected_markup",

zulipterminal/ui_tools/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def __init__(self, message: Message, model: "Model", last_message: Any) -> None:
8888
raise RuntimeError("Invalid message type")
8989

9090
if self.message["type"] == "private":
91-
if self._is_direct_message_to_self(): # rebased
91+
if self._is_direct_message_to_self():
9292
recipient = self.message["display_recipient"][0]
9393
self.recipients_names = recipient["full_name"]
9494
self.recipient_emails = [self.model.user_email]

0 commit comments

Comments
 (0)