

def test_create_protocol(self):
    argslist = [identity_fakes.protocol_id, '--identity-provider', identity_fakes.idp_id, '--mapping', identity_fakes.mapping_id]
    verifylist = [('federation_protocol', identity_fakes.protocol_id), ('identity_provider', identity_fakes.idp_id), ('mapping', identity_fakes.mapping_id)]
    parsed_args = self.check_parser(self.cmd, argslist, verifylist)
    (columns, data) = self.cmd.take_action(parsed_args)
    self.protocols_mock.create.assert_called_with(protocol_id=identity_fakes.protocol_id, identity_provider=identity_fakes.idp_id, mapping=identity_fakes.mapping_id)
    collist = ('id', 'identity_provider', 'mapping')
    self.assertEqual(collist, columns)
    datalist = (identity_fakes.protocol_id, identity_fakes.idp_id, identity_fakes.mapping_id)
    self.assertEqual(datalist, data)

dataset/ETHPy150Open dtroyer/python-openstackclient/openstackclient/tests/identity/v3/test_protocol.py TestProtocolCreate.test_create_protocol/original