def test_no_downgrade(self):
    migrate_file = versions.__path__[0]
    for (parent, dirnames, filenames) in os.walk(migrate_file):
        for filename in filenames:
            if (filename.split('.')[1] == 'py'):
                model_name = filename.split('.')[0]
                model = __import__(('glance.db.sqlalchemy.alembic_migrations.versions.' + model_name))
                obj = getattr(getattr(getattr(getattr(getattr(model, 'db'), 'sqlalchemy'), 'alembic_migrations'), 'versions'), model_name)
                func = getattr(obj, 'downgrade', None)
                self.assertIsNone(func)
def test_no_downgrade(self):
    migrate_file = versions.__path__[0]
    for (parent, dirnames, filenames) in os.walk(migrate_file):
        for filename in filenames:
            if (filename.split('.')[1] == 'py'):
                model_name = filename.split('.')[0]
                model = __import__(('glance.db.sqlalchemy.alembic_migrations.versions.' + model_name))
                obj = getattr(getattr(getattr(getattr(getattr(model, 'db'), 'sqlalchemy'), 'alembic_migrations'), 'versions'), model_name)
                func = getattr(obj, 'downgrade', None)
                self.assertIsNone(func)