'Create the 0010 category and upload the freebayes repository to the tool shed, if necessary.'

def test_0005_ensure_repositories_and_categories_exist(self):

    category = self.create_category(name='Test    0010    Repository    With    Tool    Dependencies', description='Tests    for    a    repository    with    tool    dependencies.')
    self.login(email=common.test_user_1_email, username=common.test_user_1_name)
    repository = self.get_or_create_repository(name='freebayes_0010', description="Galaxy's    freebayes    tool", long_description="Long    description    of    Galaxy's    freebayes    tool", owner=common.test_user_1_name, category_id=self.security.encode_id(category.id))
    if self.repository_is_new(repository):
        self.upload_file(repository, filename='freebayes/freebayes.xml', filepath=None, valid_tools_only=False, uncompress_file=False, remove_repo_files_not_in_tar=False, commit_message='Uploaded    the    tool    xml.', strings_displayed=['Metadata    may    have    been    defined', 'This    file    requires    an    entry', 'tool_data_table_conf'], strings_not_displayed=[])
        self.upload_file(repository, filename='freebayes/tool_data_table_conf.xml.sample', filepath=None, valid_tools_only=False, uncompress_file=False, remove_repo_files_not_in_tar=False, commit_message='Uploaded    the    tool    data    table    sample    file.', strings_displayed=[], strings_not_displayed=[])
        self.upload_file(repository, filename='freebayes/sam_fa_indices.loc.sample', filepath=None, valid_tools_only=True, uncompress_file=False, remove_repo_files_not_in_tar=False, commit_message='Uploaded    tool    data    table    .loc    file.', strings_displayed=[], strings_not_displayed=[])
        self.upload_file(repository, filename=os.path.join('freebayes', 'malformed_tool_dependencies', 'tool_dependencies.xml'), filepath=None, valid_tools_only=False, uncompress_file=False, remove_repo_files_not_in_tar=False, commit_message='Uploaded    malformed    tool    dependency    XML.', strings_displayed=['Exception    attempting    to    parse', 'not    well-formed'], strings_not_displayed=[])
        self.upload_file(repository, filename=os.path.join('freebayes', 'invalid_tool_dependencies', 'tool_dependencies.xml'), filepath=None, valid_tools_only=False, uncompress_file=False, remove_repo_files_not_in_tar=False, commit_message='Uploaded    invalid    tool    dependency    XML.', strings_displayed=['The    settings    for    <b>name</b>,    <b>version</b>    and    <b>type</b>    from    a    contained    tool    configuration'], strings_not_displayed=[])
        self.upload_file(repository, filename=os.path.join('freebayes', 'tool_dependencies.xml'), filepath=None, valid_tools_only=True, uncompress_file=False, remove_repo_files_not_in_tar=False, commit_message='Uploaded    valid    tool    dependency    XML.', strings_displayed=[], strings_not_displayed=[])
