

@mock.patch.object(cli, '_compare_labels')
def test__validate_single_revision_labels_branches_fail_different_labels(self, compare_mock):
    fake_down_revision = FakeRevision()
    fake_revision = FakeRevision(down_revision=fake_down_revision)
    script_dir = mock.Mock()
    script_dir.get_revision.return_value = fake_down_revision
    cli._validate_single_revision_labels(script_dir, fake_revision, label='fakebranch')
    expected_labels = {'fakebranch'}
    compare_mock.assert_has_calls([mock.call(revision, expected_labels) for revision in (fake_revision, fake_down_revision)])

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