def testRowCountIsEqualToX(self): dbDriver = DBDriverMock() sut = Pydblibrary() sut.connect_to_database(dbDriver, 'someDbName', 'someUsername', 'somePassword', 'someHost', '7777') responses = {'select * from employee': [(0, 'John', 'Doe'), (1, 'Jane', 'Doe')]} dbDriver.connection.cursor().setQueryResponses(responses) sut.row_count_is_equal_to_x('select * from employee', 2)
def testRowCountIsEqualToX(self): dbDriver = DBDriverMock() sut = Pydblibrary() sut.connect_to_database(dbDriver, 'someDbName', 'someUsername', 'somePassword', 'someHost', '7777') responses = { 'select * from employee': [(0, 'John', 'Doe'), (1, 'Jane', 'Doe')] } dbDriver.connection.cursor().setQueryResponses(responses) sut.row_count_is_equal_to_x('select * from employee', 2)