示例#1
0
 def test_getIdenticalRecordsCountByRecord_title(self):
     fullBooksList = readingFromFile.Reading("bookAds.json").getBooks()
     self.assertEqual(
         book.Book.getIdenticalRecordsCountByRecord(fullBooksList, "title",
                                                    "Tarzanas dziunglese"),
         1)
 def test_getSellerCountByCity_Klaipeda(self):
     fullSellersList = readingFromFile.Reading("bookAds.json").getSellers()
     self.assertEqual(
         seller.Seller.getSellerCountByCity(fullSellersList, 'Klaipeda'), 1)
示例#3
0
 def test_getIdenticalRecordsCountByRecord_etc(self):
     fullBooksList = readingFromFile.Reading("bookAds.json").getBooks()
     self.assertEqual(
         book.Book.getIdenticalRecordsCountByRecord(fullBooksList,
                                                    "wrong input", "Hello"),
         "Wrong record type")
示例#4
0
 def test_getIdenticalRecordsCountByRecord_type(self):
     fullBooksList = readingFromFile.Reading("bookAds.json").getBooks()
     self.assertEqual(
         book.Book.getIdenticalRecordsCountByRecord(fullBooksList, "type",
                                                    "Leisure books"), 3)
示例#5
0
 def test_getIdenticalRecordsCountByRecord_category(self):
     fullBooksList = readingFromFile.Reading("bookAds.json").getBooks()
     self.assertEqual(
         book.Book.getIdenticalRecordsCountByRecord(fullBooksList,
                                                    "category", "Vaikams"),
         0)
示例#6
0
 def test_getIdenticalRecordsCountByRecord_releaseDate(self):
     fullBooksList = readingFromFile.Reading("bookAds.json").getBooks()
     self.assertEqual(
         book.Book.getIdenticalRecordsCountByRecord(fullBooksList,
                                                    "release date", "2015"),
         2)
示例#7
0
 def test_getIdenticalRecordsCountByRecord_author(self):
     fullBooksList = readingFromFile.Reading("bookAds.json").getBooks()
     self.assertEqual(
         book.Book.getIdenticalRecordsCountByRecord(fullBooksList, "author",
                                                    "Henderson Lauren"), 1)