mirror of https://github.com/zulip/zulip.git
test_mattermost_importer: Fix leftover references to message.pub_date.
The field is now called date_sent.
This commit is contained in:
parent
d2970a56c2
commit
a94b04dede
|
@ -635,21 +635,21 @@ class MatterMostImporter(ZulipTestCase):
|
|||
self.assertIsNotNone(message.rendered_content)
|
||||
self.assertEqual(len(messages), 11)
|
||||
|
||||
stream_messages = messages.filter(recipient__type=Recipient.STREAM).order_by("pub_date")
|
||||
stream_messages = messages.filter(recipient__type=Recipient.STREAM).order_by("date_sent")
|
||||
stream_recipients = stream_messages.values_list("recipient", flat=True)
|
||||
self.assertEqual(len(stream_messages), 4)
|
||||
self.assertEqual(len(set(stream_recipients)), 2)
|
||||
self.assertEqual(stream_messages[0].sender.email, "ron@zulip.com")
|
||||
self.assertEqual(stream_messages[0].content, "ron joined the channel.\n\n")
|
||||
|
||||
huddle_messages = messages.filter(recipient__type=Recipient.HUDDLE).order_by("pub_date")
|
||||
huddle_messages = messages.filter(recipient__type=Recipient.HUDDLE).order_by("date_sent")
|
||||
huddle_recipients = huddle_messages.values_list("recipient", flat=True)
|
||||
self.assertEqual(len(huddle_messages), 3)
|
||||
self.assertEqual(len(set(huddle_recipients)), 1)
|
||||
self.assertEqual(huddle_messages[0].sender.email, "ginny@zulip.com")
|
||||
self.assertEqual(huddle_messages[0].content, "Who is going to Hogesmead this weekend?\n\n")
|
||||
|
||||
personal_messages = messages.filter(recipient__type=Recipient.PERSONAL).order_by("pub_date")
|
||||
personal_messages = messages.filter(recipient__type=Recipient.PERSONAL).order_by("date_sent")
|
||||
personal_recipients = personal_messages.values_list("recipient", flat=True)
|
||||
self.assertEqual(len(personal_messages), 4)
|
||||
self.assertEqual(len(set(personal_recipients)), 3)
|
||||
|
|
Loading…
Reference in New Issue