'Update IdP\'s immutable parameters.
Expect HTTP BAD REQUEST.'

def test_update_idp_immutable_attributes(self):

    default_resp = self._create_default_idp()
    default_idp = self._fetch_attribute_from_response(default_resp, 'identity_provider')
    idp_id = default_idp.get('id')
    self.assertIsNotNone(idp_id)
    body = self._http_idp_input()
    body['id'] = uuid.uuid4().hex
    body['protocols'] = [uuid.uuid4().hex, uuid.uuid4().hex]
    url = self.base_url(suffix=idp_id)
    self.patch(url, body={'identity_provider': body}, expected_status=http_client.BAD_REQUEST)
