

@test.create_stubs({
    api.keystone: ('identity_provider_create',),
})
def test_create(self):
    idp = self.identity_providers.first()
    api.keystone.identity_provider_create(IgnoreArg(), idp.id, description=idp.description, enabled=idp.enabled, remote_ids=idp.remote_ids).AndReturn(idp)
    self.mox.ReplayAll()
    formData = {
        'method': 'RegisterIdPForm',
        'id': idp.id,
        'description': idp.description,
        'enabled': idp.enabled,
        'remote_ids': ', '.join(idp.remote_ids),
    }
    res = self.client.post(IDPS_REGISTER_URL, formData)
    self.assertNoFormErrors(res)
    self.assertMessageCount(success=1)

dataset/ETHPy150Open openstack/horizon/openstack_dashboard/dashboards/identity/identity_providers/tests.py IdPsViewTests.test_create/original