Module Import alias ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier Assign NameStore AttributeLoad NameLoad attr ClassDef bases AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Str Assign NameStore ListLoad TupleLoad Str Dict Str Str TupleLoad Str Dict Str Str TupleLoad Str Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Raise Call AttributeLoad NameLoad attr Str If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body If BoolOpAnd CompareEq NameLoad Str CompareEq NameLoad Str body Return NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr attr attr If Call NameLoad NameLoad NameLoad body If BoolOpAnd CompareEq NameLoad Str CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr For NameStore Call AttributeLoad NameLoad attr NameLoad body If CompareEq SubscriptLoad NameLoad Index Str AttributeLoad SubscriptLoad NameLoad Index Num attr body Return NameLoad Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad SubscriptLoad NameLoad Index Num attr For NameStore NameLoad body If CompareIn NameLoad SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Str body Return NameLoad orelse For TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameLoad body If BoolOpAnd CompareEq NameLoad Str CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIn NameLoad SubscriptLoad NameLoad Index Str body Return NameLoad Return NameLoad decorator_list decorator_list
N/A N/A mock oslo_db.sqlalchemy test_migrations N/A sqlalchemy N/A testscenarios subunit2sql.db models subunit2sql.tests base subunit2sql.tests db_test_utils subunit2sql.tests subunit2sql_fixtures fixtures N/A load_tests N/A testscenarios load_tests_apply_scenarios TestModelsMigrations N/A N/A test_migrations ModelsMigrationsSync N/A base TestCase N/A N/A Test for checking of equality models state and migrations.

    Output is a list that contains information about differences between db and
    models. Output example::
       [('add_table',
         Table('bat', MetaData(bind=None),
               Column('info', String(), table=<bat>), schema=None)),
        ('remove_table',
         Table(u'bar', MetaData(bind=None),
               Column(u'data', VARCHAR(), table=<bar>), schema=None)),
        ('add_column',
         None,
         'foo',
         Column('data', Integer(), table=<foo>)),
        ('remove_column',
         None,
         'foo',
         Column(u'old_data', VARCHAR(), table=None)),
        [('modify_nullable',
          None,
          'foo',
          u'x',
          {'existing_server_default': None,
          'existing_type': INTEGER()},
          True,
          False)]]
    * ``remove_*`` means that there is extra table/column/constraint in db;
    * ``add_*`` means that it is missing in db;
    * ``modify_*`` means that on column in db is set wrong
      type/nullable/server_default. Element contains information:
        - what should be modified,
        - schema,
        - table,
        - column,
        - existing correct column parameters,
        - right value,
        - wrong value.
     N/A scenarios N/A N/A mysql N/A dialect mysql N/A postgresql N/A dialect postgres N/A sqlite N/A dialect sqlite N/A db N/A N/A mock MagicMock setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestModelsMigrations self setUp N/A N/A N/A self useFixture N/A N/A fixtures LockFixture N/A self dialect N/A N/A N/A N/A db_test_utils is_backend_avail N/A self dialect N/A N/A N/A N/A self skipTest N/A %s is not available N/A self dialect N/A N/A N/A self dialect sqlite N/A N/A N/A N/A self skipException sqlite skipped because of model sync issue with BigInteger vs Integer N/A N/A N/A self dialect mysql N/A N/A N/A N/A self useFixture N/A N/A fixtures MySQLConfFixture N/A N/A N/A N/A self dialect postgres N/A N/A N/A N/A self useFixture N/A N/A fixtures PostgresConfFixture N/A connect_string N/A N/A db_test_utils get_connect_string N/A self dialect N/A N/A self engine N/A N/A sqlalchemy create_engine connect_string N/A get_engine N/A N/A self N/A N/A N/A N/A self engine N/A get_metadata N/A N/A self N/A N/A N/A N/A N/A models BASE metadata N/A db_sync N/A N/A self engine N/A N/A N/A N/A N/A db_test_utils run_migration head engine N/A include_object N/A N/A self object_ name type_ reflected compare_to N/A N/A N/A N/A N/A type_ table N/A name alembic_version N/A N/A False N/A N/A N/A N/A super TestModelsMigrations self include_object object_ name type_ reflected compare_to N/A filter_metadata_diff N/A N/A self diff N/A N/A N/A N/A filter N/A self remove_unrelated_errors diff N/A remove_unrelated_errors N/A N/A self element N/A N/A N/A insp N/A N/A N/A N/A N/A sqlalchemy engine reflection Inspector from_engine N/A N/A self get_engine N/A dialect N/A N/A N/A N/A self get_engine dialect name N/A N/A isinstance element tuple N/A N/A N/A N/A dialect mysql N/A N/A element N/A 0 remove_index N/A N/A table_name N/A N/A N/A element N/A 1 table name N/A fk N/A N/A insp get_foreign_keys table_name N/A N/A N/A N/A fk N/A name N/A N/A element N/A 1 name N/A N/A False N/A cols N/A N/A c name N/A c N/A N/A element N/A 1 expressions N/A col cols N/A N/A N/A col N/A N/A N/A insp get_pk_constraint table_name N/A constrained_columns N/A N/A False N/A N/A N/A modified _ table column _ _ new element N/A N/A N/A N/A modified modify_default N/A dialect mysql N/A N/A constrained N/A N/A insp get_pk_constraint table N/A N/A column N/A constrained N/A constrained_columns N/A N/A False N/A True N/A N/A