Exemplo n.º 1
0
 def testCheckedOutTo(self):
     """
     A book should always be checked out to a customer
     or be back at the library(None)
     """
     lib   = Library()
     lib.add_books(self._book)
     self.assertIsNone(lib.books_all[0].checked_out_to)
     # when a book is checked out it should obtain status checked_out_to 
     # to point to a cus
     cus         = "Garry"
     lib.checkout(self._book,cus)
     self.assertEqual(cus,self._book.checked_out_to)