Example #1
0
 def setUp(self):
     self.migration_config = {'alembic_ini_path': '.',
                              'db_url': 'sqlite://'}
     self.engine = sqlalchemy.create_engine(self.migration_config['db_url'])
     self.alembic = ext_alembic.AlembicExtension(
         self.engine, self.migration_config)
     super(TestAlembicExtension, self).setUp()
Example #2
0
 def setUp(self):
     self.migration_config = {
         'alembic_ini_path': '.',
         'db_url': 'sqlite://'
     }
     self.alembic = ext_alembic.AlembicExtension(self.migration_config)
     super(TestAlembicExtension, self).setUp()
Example #3
0
    def test_check_enabled_false(self, command):
        """Check enabled returns False

        Verifies enabled returns False on empty alembic_ini_path variable
        """
        self.migration_config['alembic_ini_path'] = ''
        alembic = ext_alembic.AlembicExtension(self.migration_config)
        self.assertFalse(alembic.enabled)
Example #4
0
 def setUp(self):
     super(MigrationCheckersMixin, self).setUp()
     self.config = dbsync._get_alembic_config()
     self.config.ironic_inspector_config = CONF
     # create AlembicExtension with fake config and replace
     # with real one.
     self.migration_ext = ext_alembic.AlembicExtension(
         self.engine, {'alembic_ini_path': ''})
     self.migration_ext.config = self.config