def test_fetch_data(self): cursor = mock.MagicMock() result = ["a", "b"] cursor.fetchall.return_value = result assert OracleEngineSpec.fetch_data(cursor) == result
def test_fetch_data_no_description(self): cursor = mock.MagicMock() cursor.description = [] assert OracleEngineSpec.fetch_data(cursor) == []