'Testing adding a ldda1 to folder1, and adding a new UserAddress on the upload form.'

def test_030_add_dataset_to_folder1(self):

    filename = '1.bed'
    ldda_message = '1.bed    message'
    short_desc = 'Office'
    self.upload_library_dataset(cntrller='library_admin', library_id=self.security.encode_id(library1.id), folder_id=self.security.encode_id(folder1.id), filename=filename, file_type='bed', dbkey='hg18', template_refresh_field_name=address_field_name, ldda_message=ldda_message, template_refresh_field_contents='new', template_fields=[(('%s_short_desc' % address_field_name), short_desc), (('%s_name' % address_field_name), 'Dick'), (('%s_institution' % address_field_name), 'PSU'), (('%s_address' % address_field_name), '32    O    Street'), (('%s_city' % address_field_name), 'Anywhere'), (('%s_state' % address_field_name), 'AK'), (('%s_postal_code' % address_field_name), '0000000'), (('%s_country' % address_field_name), 'USA')], strings_displayed=['Upload    files'])
    global user_address1
    user_address1 = get_user_address(admin_user, short_desc)
    assert (user_address1 is not None), 'Problem    retrieving    user_address1    from    the    database'
    global ldda1
    ldda1 = get_latest_ldda_by_name(filename)
    assert (ldda1 is not None), 'Problem    retrieving    LibraryDatasetDatasetAssociation    ldda1    from    the    database'
    self.browse_library(cntrller='library_admin', library_id=self.security.encode_id(library1.id), strings_displayed=[ldda1.name, ldda1.message, 'bed'])
    self.ldda_edit_info('library_admin', self.security.encode_id(library1.id), self.security.encode_id(folder1.id), self.security.encode_id(ldda1.id), ldda1.name, strings_displayed=['Dick'])
