From afb952ae99f980f7f0255d63b9b0387afb7ecd47 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 19 Jul 2013 12:32:49 -0400 Subject: [PATCH] tests: Return the message object in send_message. (imported from commit baa26b8b2ab16f5e533b8f1606ceff5e50f275f5) --- zephyr/tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zephyr/tests.py b/zephyr/tests.py index 07099e0570..64fdb1d4ad 100644 --- a/zephyr/tests.py +++ b/zephyr/tests.py @@ -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,