def test_submit_update_no_change(in_process, git_repo_path, init_sha, git_sha):
    testfile = (git_repo_path / 'X')
    testfile.write_text('a')
    git_out('add', '.')
    msgfile = (git_repo_path / 'msg')
    msgfile.write_text('Bug 1 - A\n\nDifferential Revision: http://example.test/D123\n')
    git_out('commit', '--file', 'msg')
    sha = git_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(node=sha)]), dict(phid='PHID-USER-1'))
    mozphab.main((['submit', '--yes'] + [init_sha]), is_development=True)
    assert (call_conduit.call_count == 5)
def test_submit_update_no_change(in_process, git_repo_path, init_sha, git_sha):
    testfile = (git_repo_path / 'X')
    testfile.write_text('a')
    git_out('add', '.')
    msgfile = (git_repo_path / 'msg')
    msgfile.write_text('Bug 1 - A\n\nDifferential Revision: http://example.test/D123\n')
    git_out('commit', '--file', 'msg')
    sha = git_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(node=sha)]), dict(phid='PHID-USER-1'))
    mozphab.main((['submit', '--yes'] + [init_sha]), is_development=True)
    assert (call_conduit.call_count == 5)