# Path: oslo_db/exception.py
# class DBError(CausedByException):
# class DBDuplicateEntry(DBError):
# class DBConstraintError(DBError):
# class DBReferenceError(DBError):
# class DBNonExistentConstraint(DBError):
# class DBNonExistentTable(DBError):
# class DBNonExistentDatabase(DBError):
# class DBDeadlock(DBError):
# class DBInvalidUnicodeParameter(Exception):
# class DBMigrationError(DBError):
# class DBConnectionError(DBError):
# class DBDataError(DBError):
# class DBNotSupportedError(DBError):
# class InvalidSortKey(Exception):
# class ColumnError(Exception):
# class BackendNotAvailable(Exception):
# class RetryRequest(Exception):
# class NoEngineContextEstablished(AttributeError):
# class ContextNotRequestedError(AttributeError):
# class CantStartEngineError(Exception):
#     def __init__(self, inner_exception=None, cause=None):
#     def __init__(self, columns=None, inner_exception=None, value=None):
#     def __init__(self, table, check_name, inner_exception=None):
#     def __init__(self, table, constraint, key, key_table,
#                  inner_exception=None):
#     def __init__(self, table, constraint, inner_exception=None):
#     def __init__(self, table, inner_exception=None):
#     def __init__(self, database, inner_exception=None):
#     def __init__(self, inner_exception=None):
#     def __init__(self):
#     def __init__(self, message):
#     def __init__(self, key=None):
#     def __init__(self, inner_exc):
# 
# Path: oslo_db/sqlalchemy/test_migrations.py
# LOG = logging.getLogger(__name__)
#         BOOLEAN_METADATA = (types.BOOLEAN, types.Boolean)
#         BOOLEAN_SQL = BOOLEAN_METADATA + (types.INTEGER, types.Integer)
# class WalkVersionsMixin(object, metaclass=abc.ABCMeta):
# class ModelsMigrationsSync(object, metaclass=abc.ABCMeta):
#     def INIT_VERSION(self):
#     def REPOSITORY(self):
#     def migration_api(self):
#     def migrate_engine(self):
#     def walk_versions(self, snake_walk=False, downgrade=True):
#     def migrate_down(self, version, with_data=False):
#     def migrate_up(self, version, with_data=False):
#     def db_sync(self, engine):
#     def get_engine(self):
#     def get_metadata(self):
#     def include_object(self, object_, name, type_, reflected, compare_to):
#     def compare_type(self, ctxt, insp_col, meta_col, insp_type, meta_type):
#     def compare_server_default(self, ctxt, ins_col, meta_col,
#                                insp_def, meta_def, rendered_meta_def):
#     def _compare_server_default(bind, meta_col, insp_def, meta_def):
#     def _compare_server_default(bind, meta_col, insp_def, meta_def):
#     def filter_metadata_diff(self, diff):
#     def test_models_sync(self):
# 
# Path: oslo_db/tests/base.py
# class BaseTestCase(base.BaseTestCase):
#     def setUp(self):
# 
# Path: oslo_db/tests/sqlalchemy/base.py
# class Context(object):
# class DbTestCase(db_fixtures.OpportunisticDBTestMixin, test_base.BaseTestCase):
# class MySQLOpportunisticTestCase(DbTestCase):
# class PostgreSQLOpportunisticTestCase(DbTestCase):
# class _DbTestCase(
#     db_fixtures.OpportunisticDBTestMixin, test_base.BaseTestCase,
# ):
# class _MySQLOpportunisticTestCase(_DbTestCase):
# class _PostgreSQLOpportunisticTestCase(_DbTestCase):
#     def setUp(self):
#     def setUp(self):
#     FIXTURE = db_fixtures.MySQLOpportunisticFixture
#     FIXTURE = db_fixtures.PostgresqlOpportunisticFixture
#     FIXTURE = db_fixtures.MySQLOpportunisticFixture
#     FIXTURE = db_fixtures.PostgresqlOpportunisticFixture


from unittest import mock
from migrate.versioning import api as versioning_api
from sqlalchemy import orm
from oslo_db import exception as exc
from oslo_db.sqlalchemy import test_migrations as migrate
from oslo_db.tests import base as test_base
from oslo_db.tests.sqlalchemy import base as db_test_base
import fixtures
import sqlalchemy as sa
        self.assertTrue(msg.startswith(
            'Models and migration scripts aren\'t in sync:'))
        self.assertIn('testtbl', msg)
        self.assertIn('spam', msg)
        self.assertIn('eggs', msg)  # test that the unique constraint is added
        self.assertIn('foo', msg)
        self.assertIn('bar', msg)
        self.assertIn('bool_wo_default', msg)
        self.assertIn('defaulttest', msg)
        self.assertIn('defaulttest3', msg)
        self.assertIn('remove_fk', msg)
        self.assertIn('variant', msg)


class ModelsMigrationsSyncMySQL(
    ModelsMigrationSyncMixin,
    migrate.ModelsMigrationsSync,
    db_test_base._MySQLOpportunisticTestCase,
):

    def test_models_not_sync(self):
        self._test_models_not_sync()

    def test_models_not_sync_filtered(self):
        self._test_models_not_sync_filtered()


class ModelsMigrationsSyncPostgreSQL(
    ModelsMigrationSyncMixin,
    migrate.ModelsMigrationsSync,

# Path: oslo_db/exception.py
# class DBError(CausedByException):
# class DBDuplicateEntry(DBError):
# class DBConstraintError(DBError):
# class DBReferenceError(DBError):
# class DBNonExistentConstraint(DBError):
# class DBNonExistentTable(DBError):
# class DBNonExistentDatabase(DBError):
# class DBDeadlock(DBError):
# class DBInvalidUnicodeParameter(Exception):
# class DBMigrationError(DBError):
# class DBConnectionError(DBError):
# class DBDataError(DBError):
# class DBNotSupportedError(DBError):
# class InvalidSortKey(Exception):
# class ColumnError(Exception):
# class BackendNotAvailable(Exception):
# class RetryRequest(Exception):
# class NoEngineContextEstablished(AttributeError):
# class ContextNotRequestedError(AttributeError):
# class CantStartEngineError(Exception):
#     def __init__(self, inner_exception=None, cause=None):
#     def __init__(self, columns=None, inner_exception=None, value=None):
#     def __init__(self, table, check_name, inner_exception=None):
#     def __init__(self, table, constraint, key, key_table,
#                  inner_exception=None):
#     def __init__(self, table, constraint, inner_exception=None):
#     def __init__(self, table, inner_exception=None):
#     def __init__(self, database, inner_exception=None):
#     def __init__(self, inner_exception=None):
#     def __init__(self):
#     def __init__(self, message):
#     def __init__(self, key=None):
#     def __init__(self, inner_exc):
# 
# Path: oslo_db/sqlalchemy/test_migrations.py
# LOG = logging.getLogger(__name__)
#         BOOLEAN_METADATA = (types.BOOLEAN, types.Boolean)
#         BOOLEAN_SQL = BOOLEAN_METADATA + (types.INTEGER, types.Integer)
# class WalkVersionsMixin(object, metaclass=abc.ABCMeta):
# class ModelsMigrationsSync(object, metaclass=abc.ABCMeta):
#     def INIT_VERSION(self):
#     def REPOSITORY(self):
#     def migration_api(self):
#     def migrate_engine(self):
#     def walk_versions(self, snake_walk=False, downgrade=True):
#     def migrate_down(self, version, with_data=False):
#     def migrate_up(self, version, with_data=False):
#     def db_sync(self, engine):
#     def get_engine(self):
#     def get_metadata(self):
#     def include_object(self, object_, name, type_, reflected, compare_to):
#     def compare_type(self, ctxt, insp_col, meta_col, insp_type, meta_type):
#     def compare_server_default(self, ctxt, ins_col, meta_col,
#                                insp_def, meta_def, rendered_meta_def):
#     def _compare_server_default(bind, meta_col, insp_def, meta_def):
#     def _compare_server_default(bind, meta_col, insp_def, meta_def):
#     def filter_metadata_diff(self, diff):
#     def test_models_sync(self):
# 
# Path: oslo_db/tests/base.py
# class BaseTestCase(base.BaseTestCase):
#     def setUp(self):
# 
# Path: oslo_db/tests/sqlalchemy/base.py
# class Context(object):
# class DbTestCase(db_fixtures.OpportunisticDBTestMixin, test_base.BaseTestCase):
# class MySQLOpportunisticTestCase(DbTestCase):
# class PostgreSQLOpportunisticTestCase(DbTestCase):
# class _DbTestCase(
#     db_fixtures.OpportunisticDBTestMixin, test_base.BaseTestCase,
# ):
# class _MySQLOpportunisticTestCase(_DbTestCase):
# class _PostgreSQLOpportunisticTestCase(_DbTestCase):
#     def setUp(self):
#     def setUp(self):
#     FIXTURE = db_fixtures.MySQLOpportunisticFixture
#     FIXTURE = db_fixtures.PostgresqlOpportunisticFixture
#     FIXTURE = db_fixtures.MySQLOpportunisticFixture
#     FIXTURE = db_fixtures.PostgresqlOpportunisticFixture


# Path: oslo_db/tests/sqlalchemy/test_migrations.py
from unittest import mock
from migrate.versioning import api as versioning_api
from sqlalchemy import orm
from oslo_db import exception as exc
from oslo_db.sqlalchemy import test_migrations as migrate
from oslo_db.tests import base as test_base
from oslo_db.tests.sqlalchemy import base as db_test_base
import fixtures
import sqlalchemy as sa

        self.assertTrue(msg.startswith(
            'Models and migration scripts aren\'t in sync:'))
        self.assertIn('testtbl', msg)
        self.assertIn('spam', msg)
        self.assertIn('eggs', msg)  # test that the unique constraint is added
        self.assertIn('foo', msg)
        self.assertIn('bar', msg)
        self.assertIn('bool_wo_default', msg)
        self.assertIn('defaulttest', msg)
        self.assertIn('defaulttest3', msg)
        self.assertIn('remove_fk', msg)
        self.assertIn('variant', msg)


class ModelsMigrationsSyncMySQL(
    ModelsMigrationSyncMixin,
    migrate.ModelsMigrationsSync,
    db_test_base._MySQLOpportunisticTestCase,
):

    def test_models_not_sync(self):
        self._test_models_not_sync()

    def test_models_not_sync_filtered(self):
        self._test_models_not_sync_filtered()


class ModelsMigrationsSyncPostgreSQL(
    ModelsMigrationSyncMixin,
    migrate.ModelsMigrationsSync,

    db_test_base._PostgreSQLOpportunisticTestCase,