@test.create_stubs({api.keystone: ('identity_provider_get',
                                       'protocol_list')})
    def test_detail_protocols(self):
        idp = self.identity_providers.first()

        api.keystone.identity_provider_get(IsA(http.HttpRequest), idp.id). \
            AndReturn(idp)
        api.keystone.protocol_list(IsA(http.HttpRequest), idp.id). \
            AndReturn(self.idp_protocols.list())

        self.mox.ReplayAll()

        res = self.client.get(IDPS_DETAIL_URL + '?tab=idp_details__protocols')

        self.assertTemplateUsed(
            res, 'identity/identity_providers/_detail_overview.html')
        self.assertTemplateUsed(res, 'horizon/common/_detail_table.html')
        self.assertItemsEqual(res.context['idp_protocols_table'].data,
                              self.idp_protocols.list())
dataset/ETHPy150Open openstack/horizon/openstack_dashboard/dashboards/identity/identity_providers/tests.py/IdPsViewTests.test_detail_protocols/original