-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
13 lines (11 loc) · 746 Bytes
/
Copy pathtest.py
File metadata and controls
13 lines (11 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
import unittest
from PythonGoogleBookSearchApp import *
class TestSum(unittest.TestCase):
googleBook=GoogleBooks()
def testSearch(self):
self.assertEqual(len(self.googleBook.search("London"))>0 , True, "Search Result should be available for London keyword")
self.assertEqual(self.googleBook.printBooksToScreen(PrintType.SEARCH_RESULT) is not None , True, "Program should return search result")
self.assertEqual(len(self.googleBook.saveBook(1))>0 , True, "Reading list must be avaiable after saving a book to reading list")
self.assertEqual(self.googleBook.printBooksToScreen(PrintType.READING_LIST) is not None , True, "Program should return reading list")
if __name__ == '__main__':
unittest.main()