示例#1
0
class TestGetBookDetails(unittest.TestCase):

    def setUp(self):
        self.__conn = ConnectionSpy()
        self.__book_details = GetBookDetails(self.__conn)

    def test_get_book_details_makes_correct_calls(self):
        self.__book_details.execute((1,))
        self.assertEquals(1, self.__conn.fetch_all_with_params_calls)
示例#2
0
 def setUp(self):
     self.__conn = ConnectionSpy()
     self.__book_details = GetBookDetails(self.__conn)