def test_hg_commit_sanity(hg_ui, hg_repo):
    """Test poke_jenkins hook setup."""
    hg_commit_sanity.reposetup(hg_ui, hg_repo)
    assert hg_ui.config('hooks', 'pretxncommit.hg-commit-sanity') == hg_commit_sanity.hg_commit_sanity_hook
def test_hg_commit_sanity(hg_ui, hg_repo):
    """Test poke_jenkins hook setup."""
    hg_commit_sanity.reposetup(hg_ui, hg_repo)
    assert hg_ui.config('hooks', 'pretxncommit.hg-commit-sanity'
                        ) == hg_commit_sanity.hg_commit_sanity_hook
def hg_ui_with_checkers(hg_ui, checkers):
    """Get test mercurial ui with checkers config set up."""
    for key, value in checkers.items():
        hg_ui.setconfig('hg_commit_sanity', key, value)
    hg_commit_sanity.reposetup(hg_ui, hg_repo)
    return hg_ui
def hg_ui_with_checkers(hg_ui, checkers):
    """Get test mercurial ui with checkers config set up."""
    for key, value in checkers.items():
        hg_ui.setconfig('hg_commit_sanity', key, value)
    hg_commit_sanity.reposetup(hg_ui, hg_repo)
    return hg_ui