def test_submit_utf8_author_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'))]), [{'userName': 'alice', 'phid': 'PHID-USER-1'}])
    testfile = (git_repo_path / 'X')
    testfile.write_text('a')
    git_out('add', '.')
    git_out('commit', '--date', 'Tue, 22 Jan 2019 13:42:48 +0000', '--author', 'ćwikła <example@example.com>', '--message', 'A r?alice')
    mozphab.main(['submit', '--arc', '--yes', '--bug', '1', init_sha], is_development=True)
    log = git_out('log', '--format=%aD+++%an+++%ae', '-1')
    expected = 'Tue, 22 Jan 2019 13:42:48 +0000+++ćwikła+++ćwikła@bar.com\n'
    assert (log == expected)
def test_submit_utf8_author_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'))]), [{'userName': 'alice', 'phid': 'PHID-USER-1'}])
    testfile = (git_repo_path / 'X')
    testfile.write_text('a')
    git_out('add', '.')
    git_out('commit', '--date', 'Tue, 22 Jan 2019 13:42:48 +0000', '--author', 'ćwikła <example@example.com>', '--message', 'A r?alice')
    mozphab.main(['submit', '--arc', '--yes', '--bug', '1', init_sha], is_development=True)
    log = git_out('log', '--format=%aD+++%an+++%ae', '-1')
    expected = 'Tue, 22 Jan 2019 13:42:48 +0000+++ćwikła+++ćwikła@bar.com\n'
    assert (log == expected)