def test_add_new_book(self): book = "Lord of the Flies" patron = Patron("first", "last", 23, "98765432") patron.add_borrowed_book(book) self.assertEqual(patron.get_borrowed_books()[0], "Lord of the Flies".lower())
def test_return_book(self): book = "Lord of the Flies" patron = Patron("first", "last", 23, "98765432") patron.add_borrowed_book(book) patron.return_borrowed_book(book) self.assertEqual(len(patron.get_borrowed_books()), 0)
def test_get_books(self): patron = Patron("first", "last", 23, "98765432") books = patron.get_borrowed_books() self.assertFalse(books, "Expected empty list")