def version(self): """Print the current database version.""" print(migration.version())
def test_version(self): context = mock.Mock() context.get_current_revision = mock.Mock() alembic.migration.MigrationContext.configure.return_value = context migration.version() context.get_current_revision.assert_called_once_with()
def get_recent_db_migration_id(): return migration.version()