Exemplo n.º 1
0
 def side_effect(mo, **kwargs):
     fault = mock.Mock(faultstring="MyFault")
     raise suds.WebFault(fault, None)
Exemplo n.º 2
0
 def test_invalid_login(self, mock_client):
     mock_client.return_value.service.Login.side_effect = suds.WebFault(
         'Permission to perform this operation was denied.', '')
     self.assertRaises(VirtError, self.run_once)
Exemplo n.º 3
0
 def fail_with_web_fault(message):
     fault = mock.Mock()
     fault.faultstring = "General error."
     document = mock.Mock()
     raise suds.WebFault(fault, document)