def testRowCountIsGreaterThanX(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_greater_than_x('select * from employee', 1)
Example #2
0
    def testRowCountIsGreaterThanX(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_greater_than_x('select * from employee', 1)