

@mock.patch('alembic.script.ScriptDirectory.walk_revisions')
def test__find_milestone_revisions_branchless(self, walk_mock):
    revisions = [FakeRevision() for r in range(5)]
    revisions[2].module.neutron_milestone = [migration.LIBERTY]
    walk_mock.return_value = revisions
    m = cli._find_milestone_revisions(self.configs[0], 'liberty')
    self.assertEqual(1, len(m))
    m = cli._find_milestone_revisions(self.configs[0], 'mitaka')
    self.assertEqual(0, len(m))

dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/db/test_migration.py TestCli.test__find_milestone_revisions_branchless/original