def test_repr_multiple_posts(self): b = Blog('Title', 'Author') b.posts = ['post1'] b2 = Blog('My Day', 'Bob') b2.posts = ['Test Blog', 'another'] self.assertEqual(b.__repr__(), 'Title by Author (1 post)') self.assertEqual(b2.__repr__(), 'My Day by Bob (2 posts)')
def test_repr_multiple_posts(self): b = Blog('Test', 'Test Author') b.posts = ['test'] self.assertEqual((b.__repr__()), 'Test by Test Author (1 post)')