55
66# Test data constants
77TEST_BOOKS = [
8- {"title" : "Carrie" , "author" : "Stephen King" },
9- {"title" : "Ready Player One" , "author" : "Ernest Cline" },
8+ {"title" : "Carrie" , "author" : "Stephen King" , "publisher" : "Publisher A" },
9+ {"title" : "Ready Player One" , "author" : "Ernest Cline" , "publisher" : "Publisher B" },
1010]
1111
1212class TestMainApp :
@@ -57,7 +57,7 @@ def test_update_book(self, test_db):
5757
5858 def test_delete_book (self , test_db ):
5959 """Test deleting a book"""
60- book = create_book (test_db , BookIn (title = "To Delete" , author = "Author" ))
60+ book = create_book (test_db , BookIn (title = "To Delete" , author = "Author" , publisher = "Publisher C" ))
6161 deleted_book = delete_book (test_db , book .id )
6262
6363 assert deleted_book is not None
@@ -67,5 +67,6 @@ def test_delete_book(self, test_db):
6767 def test_nonexistent_operations (self , test_db ):
6868 """Test operations on nonexistent books"""
6969 assert get_book (test_db , 999999 ) is None
70- assert update_book (test_db , 999999 , BookIn (title = "Test" , author = "Test" )) is None
70+ assert update_book (test_db , 999999 , BookIn (title = "Test" , author = "Test" , publisher = "Publisher D" )) is None
7171 assert delete_book (test_db , 999999 ) is None
72+
0 commit comments