def test_two_messages(self): self.assertEqual(list_messages(self.messages, '<LABEL>'), [ '<LABEL> (2):', ' - <message_1>', ' - <message_2>', '', ])
def test_three_messages(self): self.messages.append('<message_3>') self.assertEqual(list_messages(self.messages, '<LABEL>'), [ '<LABEL> (3):', ' - <message_1>', ' - <message_2>', ' - <message_3>', '', ])
def test_no_messages(self): self.assertEqual(list_messages([], '<LABEL>'), [])