

def _prepare_mocked_sqlalchemy_inspector(self):
    mock_inspector = mock.MagicMock()
    self.get_table_names.return_value = ['foo', 'bar']
    mock_inspector.get_columns.return_value = [{
        'name': 'foo_column',
    }, {
        'name': 'bar_column',
    }]
    self.mock_sa_inspector.from_engine.return_value = mock_inspector

dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/db/test_migration.py TestDbMigration._prepare_mocked_sqlalchemy_inspector/VarMisuse@18/31 `mock_inspector`->`self`