'Call ``PATCH /users/{user_id}`` with domain_id.
A user\'s `domain_id` is immutable. Ensure that any attempts to update
the `domain_id` of a user fails.'

def test_update_user_domain_id(self):

    user = unit.new_user_ref(domain_id=self.domain['id'])
    user = self.identity_api.create_user(user)
    user['domain_id'] = CONF.identity.default_domain_id
    self.patch(('/users/%(user_id)s' % {'user_id': user['id']}), body={'user': user}, expected_status=exception.ValidationError.code)
