

@mock.patch.object(shade.OperatorCloud, 'ironic_client')
def test_list_nics_for_machine_failure(self, mock_client):
    mock_client.node.list_ports.side_effect = Exception()
    mock_client.assertRaises(exc.OpenStackCloudException, self.cloud.list_nics_for_machine, None)

dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py TestShadeOperator.test_list_nics_for_machine_failure/VarMisuse@38/59 `self`->`mock_client`