diff --git a/neutron/tests/unit/db/test_migration.py b/neutron/tests/unit/db/test_migration.py index 581a8c412fb..6520bb9ecdd 100644 --- a/neutron/tests/unit/db/test_migration.py +++ b/neutron/tests/unit/db/test_migration.py @@ -682,7 +682,10 @@ class TestCli(base.BaseTestCase): s = textwrap.dedent(s) s = re.escape(s) # alembic 0.8.9 added additional leading '# ' before comments - return s.replace('\\#\\#\\#\\ ', '(# )?### ') + s = s.replace('\\#\\#\\#\\ ', '(# )?### ') + # alembic 1.12.0 Autogenerate includes type_ option conditionally + s = s.replace('\\.\\*', '.*') + return s expected_regex = ("""\ ### commands auto generated by Alembic - please adjust! ### @@ -702,7 +705,7 @@ class TestCli(base.BaseTestCase): expected_regex = ("""\ ### commands auto generated by Alembic - please adjust! ### - op.drop_constraint('user', 'uq_user_org', type_=None) + op.drop_constraint('user', 'uq_user_org'.*) op.drop_column('user', 'organization_name') ### end Alembic commands ###""") self.assertThat(