'Create the 0020 category and upload the emboss repository to the tool shed, if necessary.'

def test_0005_ensure_repositories_and_categories_exist(self):

    global repository_datatypes_count
    global running_standalone
    category = self.create_category(name='Test    0020    Basic    Repository    Dependencies', description='Tests    for    a    repository    with    tool    dependencies.')
    self.login(email=common.test_user_1_email, username=common.test_user_1_name)
    datatypes_repository = self.get_or_create_repository(name=datatypes_repository_name, description=datatypes_repository_description, long_description=datatypes_repository_long_description, owner=common.test_user_1_name, category_id=self.security.encode_id(category.id), strings_displayed=[])
    if self.repository_is_new(datatypes_repository):
        running_standalone = True
        self.upload_file(datatypes_repository, filename='emboss/datatypes/datatypes_conf.xml', filepath=None, valid_tools_only=True, uncompress_file=False, remove_repo_files_not_in_tar=False, commit_message='Uploaded    datatypes_conf.xml.', strings_displayed=[], strings_not_displayed=[])
        emboss_repository = self.get_or_create_repository(name=emboss_repository_name, description=emboss_repository_description, long_description=emboss_repository_long_description, owner=common.test_user_1_name, category_id=self.security.encode_id(category.id), strings_displayed=[])
        self.upload_file(emboss_repository, filename='emboss/emboss.tar', filepath=None, valid_tools_only=True, uncompress_file=True, remove_repo_files_not_in_tar=False, commit_message='Uploaded    emboss.tar', strings_displayed=[], strings_not_displayed=[])
        repository_dependencies_path = self.generate_temp_path('test_1020', additional_paths=['emboss', '5'])
        repository_tuple = (self.url, datatypes_repository.name, datatypes_repository.user.username, self.get_repository_tip(datatypes_repository))
        self.create_repository_dependency(repository=emboss_repository, repository_tuples=[repository_tuple], filepath=repository_dependencies_path)
    repository_datatypes_count = int(self.get_repository_datatypes_count(datatypes_repository))
