'Create a new user and assign user a role on a project.'

def _create_new_user_and_assign_role_on_project(self):

    new_user = unit.new_user_ref(domain_id=self.domain_id)
    user_ref = self.identity_api.create_user(new_user)
    collection_url = ('/projects/%(project_id)s/users/%(user_id)s/roles' % {'project_id': self.project_id, 'user_id': user_ref['id']})
    member_url = ('%(collection_url)s/%(role_id)s' % {'collection_url': collection_url, 'role_id': self.role_id})
    self.put(member_url)
    self.head(member_url)
    return (member_url, user_ref)
