def _helper_assert_get_alias_dict(
    contents_of_alias_dict_file,
    target_alias_dict,
    config_obj,
    alias_file_path,
    alias_file_path_is_file,
    mock_is_file,
    mock_get_alias_file_path,
    mock_get_contents,
):
    """
    contents_of_alias_dict_file: the string contents of the file storing the
        dictionary of aliases
    target_alias_dict: the target result of get_alias_dict
    config_obj: the Config object
    alias_file_path: the path to be returned by _get_alias_file_path
    alias_file_path_is_file: True if the alias path is a file, else False
    """
    mock_is_file.return_value = alias_file_path_is_file
    mock_get_alias_file_path.return_value = alias_file_path
    mock_get_contents.return_value = contents_of_alias_dict_file

    actual = util.get_alias_dict(config_obj)

    assert actual == target_alias_dict

    mock_get_alias_file_path.assert_called_once_with(config_obj)
    mock_is_file.assert_called_once_with(alias_file_path)

    if alias_file_path_is_file:
        mock_get_contents.assert_called_once_with(alias_file_path)
    else:
        assert mock_get_contents.call_count == 0

    contents_of_alias_dict_file: the string contents of the file storing the
        dictionary of aliases
    target_alias_dict: the target result of get_alias_dict
    config_obj: the Config object
    alias_file_path: the path to be returned by _get_alias_file_path
    alias_file_path_is_file: True if the alias path is a file, else False
    
test/util_test.py