Exemplo n.º 1
0
 def test_hasRead_case_insensitive(self):
     # test that hasRead can find a bookName rgardless of case 
     
     # Set up
     testName = 'Diana McSpadden'
     testEmail = '*****@*****.**'
     testGenre = 'Historical Fiction'
     testBookNum = 2
     testBookLst = [('Black Hills: A Novel',4),('The Red Tent',5)]
     
     bookLvr1 = BOOKLOVER(testName, testEmail, testGenre, testBookNum, testBookLst)
     
     # assert that hasRead returns false for unread book
     self.assertTrue(bookLvr1.hasRead('tHE rED tENT'))
Exemplo n.º 2
0
 def test_hasRead_does_not_find_unread_book(self):
     # test that hasRead returns False when a book has not been read
     
     # Set up
     testName = 'Diana McSpadden'
     testEmail = '*****@*****.**'
     testGenre = 'Historical Fiction'
     testBookNum = 2
     testBookLst = [('Black Hills: A Novel',4),('The Red Tent',5)]
     
     bookLvr1 = BOOKLOVER(testName, testEmail, testGenre, testBookNum, testBookLst)
     
     # assert that hasRead returns false for unread book
     self.assertFalse(bookLvr1.hasRead('Lonesome Dove'))