'Reseting data to enable later test runs to pass'

def test_999_reset_data_for_later_test_runs(self):

    for form in [AddressField_form, CheckboxField_form, SelectField_form, TextArea_form, TextField_form, WorkflowField_form]:
        self.mark_form_deleted(self.security.encode_id(form.form_definition_current.id))
    for user_address in [user_address1, user_address2]:
        mark_obj_deleted(user_address)
    for library in [library1, library2, library3, library4, library5, library6]:
        self.delete_library_item('library_admin', self.security.encode_id(library.id), self.security.encode_id(library.id), library.name, item_type='library')
        self.purge_library(self.security.encode_id(library.id), library.name)
    for user in [admin_user, regular_user1, regular_user2, regular_user3]:
        refresh(user)
        if (len(user.roles) != 1):
            raise AssertionError(('%d    UserRoleAssociations    are    associated    with    %s    (    should    be    1    )' % (len(user.roles), user.email)))
