'Deleting an IdP will delete its assigned protocol.'

def test_delete_idp_also_deletes_assigned_protocols(self):

    default_resp = self._create_default_idp()
    default_idp = self._fetch_attribute_from_response(default_resp, 'identity_provider')
    idp_id = default_idp['id']
    protocol_id = uuid.uuid4().hex
    url = self.base_url(suffix='%(idp_id)s/protocols/%(protocol_id)s')
    idp_url = self.base_url(suffix=idp_id)
    kwargs = {'expected_status': http_client.CREATED}
    (resp, idp_id, proto) = self._assign_protocol_to_idp(url=url, idp_id=idp_id, proto=protocol_id, **kwargs)
    self.assertEqual(1, len(self.federation_api.list_protocols(idp_id)))
    self.delete(idp_url)
    self.get(idp_url, expected_status=http_client.NOT_FOUND)
    self.assertEqual(0, len(self.federation_api.list_protocols(idp_id)))
