'Create and later fetch IdP.'

def test_get_head_idp(self):

    body = self._http_idp_input()
    domain = unit.new_domain_ref()
    self.resource_api.create_domain(domain['id'], domain)
    body['domain_id'] = domain['id']
    default_resp = self._create_default_idp(body=body)
    default_idp = self._fetch_attribute_from_response(default_resp, 'identity_provider')
    idp_id = default_idp.get('id')
    url = self.base_url(suffix=idp_id)
    resp = self.get(url)
    body_keys = list(body)
    self.assertValidResponse(resp, 'identity_provider', dummy_validator, keys_to_check=body_keys, ref=body)
    self.head(url, expected_status=http_client.OK)
