

def test_migrate_up_with_data(self):
    test_value = {
        'a': 1,
        'b': 2,
    }
    self.migration_api.db_version.return_value = 141
    self._pre_upgrade_141 = mock.MagicMock()
    self._pre_upgrade_141.return_value = test_value
    self._check_141 = mock.MagicMock()
    self.migrate_up(141, True)
    self._pre_upgrade_141.assert_called_with(self.engine)
    self._check_141.assert_called_with(self.engine, test_value)

dataset/ETHPy150Open openstack/oslo.db/oslo_db/tests/sqlalchemy/test_migrations.py TestWalkVersions.test_migrate_up_with_data/original