def METHOD_NAME(session_puppet_enabled_sat, module_puppet_org, module_puppet_loc):
    """Perform end to end testing for puppet environment component
    :id: 2ef32b2d-acdd-4cb1-a760-da4fd1166167
    :expectedresults: All expected CRUD actions finished successfully
    :CaseLevel: Integration
    :CaseImportance: High
    """
    name = gen_string('alpha')
    new_name = gen_string('alpha')
    with session_puppet_enabled_sat.ui_session() as session:
        session.puppetenvironment.create(
            {
                'environment.name': name,
                'locations.resources.assigned': [module_puppet_loc.name],
                'organizations.resources.assigned': [module_puppet_org.name],
            }
        )
        found_envs = session.puppetenvironment.search(name)
        assert name in [env['Name'] for env in found_envs]
        env_values = session.puppetenvironment.read(name)
        assert env_values['environment']['name'] == name
        assert module_puppet_org.name in env_values['organizations']['resources']['assigned']
        assert module_puppet_loc.name in env_values['locations']['resources']['assigned']
        session.puppetenvironment.update(name, {'environment.name': new_name})
        found_envs = session.puppetenvironment.search(new_name)
        assert new_name in [env['Name'] for env in found_envs]
        session.puppetenvironment.delete(new_name)
        assert not session.puppetenvironment.search(new_name)