def test_submit_update_bug_id_arc(in_process, git_repo_path, init_sha):
    call_conduit.reset_mock()
    call_conduit.side_effect = (dict(), dict(data=[dict(phid='PHID-REPO-1', fields=dict(vcs='git'))]), dict(data=[search_rev(rev=123)]), dict(data=[search_diff()]), dict(phid='PHID-USER-1'))
    arc_call_conduit.reset_mock()
    arc_call_conduit.side_effect = ({}, {'data': {}})
    testfile = (git_repo_path / 'X')
    testfile.write_text('a')
    git_out('add', '.')
    git_out('commit', '--message', 'Bug 1 - A\n\nDifferential Revision: http://example.test/D123\n')
    mozphab.main(['submit', '--arc', '--yes', '--bug', '2', init_sha], is_development=True)
    arc_call_conduit.assert_called_with('differential.revision.edit', {'objectIdentifier': 'D123', 'transactions': [{'type': 'bugzilla.bug-id', 'value': '2'}]}, mock.ANY)
def test_submit_update_bug_id_arc(in_process, git_repo_path, init_sha):
    call_conduit.reset_mock()
    call_conduit.side_effect = (dict(), dict(data=[dict(phid='PHID-REPO-1', fields=dict(vcs='git'))]), dict(data=[search_rev(rev=123)]), dict(data=[search_diff()]), dict(phid='PHID-USER-1'))
    arc_call_conduit.reset_mock()
    arc_call_conduit.side_effect = ({}, {'data': {}})
    testfile = (git_repo_path / 'X')
    testfile.write_text('a')
    git_out('add', '.')
    git_out('commit', '--message', 'Bug 1 - A\n\nDifferential Revision: http://example.test/D123\n')
    mozphab.main(['submit', '--arc', '--yes', '--bug', '2', init_sha], is_development=True)
    arc_call_conduit.assert_called_with('differential.revision.edit', {'objectIdentifier': 'D123', 'transactions': [{'type': 'bugzilla.bug-id', 'value': '2'}]}, mock.ANY)