

@mock.patch('alembic.script.ScriptDirectory.walk_revisions')
def test__find_milestone_revisions_two_branches(self, walk_mock):
    c_revs = [FakeRevision(labels={cli.CONTRACT_BRANCH}) for r in range(5)]
    c_revs[1].module.neutron_milestone = [migration.LIBERTY]
    e_revs = [FakeRevision(labels={cli.EXPAND_BRANCH}) for r in range(5)]
    e_revs[3].module.neutron_milestone = [migration.LIBERTY]
    walk_mock.return_value = (c_revs + e_revs)
    m = cli._find_milestone_revisions(m.configs[0], 'liberty')
    self.assertEqual(2, 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_two_branches/VarMisuse@110/172 `self`->`m`