mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
tests: Return the message object in send_message.
(imported from commit baa26b8b2ab16f5e533b8f1606ceff5e50f275f5)
This commit is contained in:
parent
270110d8a4
commit
afb952ae99
@ -149,9 +149,11 @@ class AuthedTestCase(TestCase):
|
||||
pub_date = now()
|
||||
(sending_client, _) = Client.objects.get_or_create(name="test suite")
|
||||
# Subject field is unused by PMs.
|
||||
do_send_message(Message(sender=sender, recipient=recipient, subject=subject,
|
||||
pub_date=pub_date, sending_client=sending_client,
|
||||
content=content))
|
||||
message = Message(sender=sender, recipient=recipient, subject=subject,
|
||||
pub_date=pub_date, sending_client=sending_client,
|
||||
content=content)
|
||||
do_send_message(message)
|
||||
return message
|
||||
|
||||
def get_old_messages(self, anchor=1, num_before=1, num_after=1):
|
||||
post_params = {"anchor": anchor, "num_before": num_before,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user