

@mock.patch.object(shade.OperatorCloud, 'ironic_client')
def test_list_nics_failure(self, mock_client):
    mock_client.port.list.side_effect = Exception()
    mock_client.assertRaises(exc.OpenStackCloudException, self.cloud.list_nics)

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