'Test whether Keystone checks for unique idp/protocol values.
Add same protocol twice, expect Keystone to reject a latter call and
return HTTP 409 Conflict code.'

def test_protocol_idp_pk_uniqueness(self):

    url = self.base_url(suffix='%(idp_id)s/protocols/%(protocol_id)s')
    kwargs = {'expected_status': http_client.CREATED}
    (resp, idp_id, proto) = self._assign_protocol_to_idp(proto='saml2', url=url, **kwargs)
    kwargs = {'expected_status': http_client.CONFLICT}
    self._assign_protocol_to_idp(idp_id=idp_id, proto='saml2', validate=False, url=url, **kwargs)
