'Call ``POST and PATCH /users`` default_project_id=domain_id.
Make sure we validate the default_project_id if it is specified.
It cannot be set to a domain_id, even for a project acting as domain
right now. That\'s because we haven\'t sort out the issuing
project-scoped token for project acting as domain bit yet. Once we
got that sorted out, we can relax this constraint.'

def test_setting_default_project_id_to_domain_failed(self):

    ref = unit.new_user_ref(domain_id=self.domain_id, project_id=self.domain_id)
    self.post('/users', body={'user': ref}, token=CONF.admin_token, expected_status=http_client.BAD_REQUEST)
    user = {'default_project_id': self.domain_id}
    self.patch(('/users/%(user_id)s' % {'user_id': self.user['id']}), body={'user': user}, token=CONF.admin_token, expected_status=http_client.BAD_REQUEST)
