def test_comments_returns_an_ordered_list(self): user = "******" other_user = "******" comments = [ {"username": user, "text": "first"}, {"username": other_user, "text": "first!!"}, {"username": user, "text": "c'mon guys"}, ] result = "1) Tim: first\n2) Minchin: first!!\n3) Tim: c'mon guys\n" self.assertEqual(Output.comments(comments), result)
def test_comments_returns_an_ordered_list(self): user = "******" other_user = "******" comments = [{ 'username': user, 'text': "first" }, { 'username': other_user, 'text': "first!!" }, { 'username': user, 'text': "c'mon guys" }] result = "1) Tim: first\n2) Minchin: first!!\n3) Tim: c'mon guys\n" self.assertEqual(Output.comments(comments), result)
def test_comments_returns_a_message_when_there_are_no_comments(self): self.assertEqual(Output.comments([]), "The card has no comments")
def comments(self): self.command.output(Output.comments(self.card.comments()))
def test_comments_returns_a_message_when_there_are_no_comments(self): self.assertEqual(Output.comments([]), "The card has no comments")
def comments(self): self.command.output(Output.comments(self.card.comments()))