예제 #1
0
 def test_message_recipients_is_conversation_participants_without_sender(self):
     message = Message(
      "memento mori", datetime(2011, 3, 1, 12, 34, 32), self.contact1
     )
     conversation = Mock(Conversation)
     conversation.participants.return_value = set(
      [self.contact1, self.contact2, self.contact3]
     )
     message._conversation = conversation
     self.assertEqual(
      message.recipients(),
      set([self.contact2, self.contact3])
     )
예제 #2
0
 def test_message_recipients_is_empty_when_no_conversation(self):
     message = Message(
      "memento mori", datetime(2011, 3, 1, 12, 34, 32), self.contact1
     )
     self.assertEqual(message.recipients(), set())