Here are the examples of the python api mock.sentinel.sent taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
Project: pyon Source File: test_endpoint.py
def test__message_received_interceptor_exception(self):
e = RPCResponseEndpointUnit(routing_obj=self)
e.send = Mock()
e.send.return_value = sentinel.sent
e.channel = Mock()
with patch('pyon.net.endpoint.ResponseEndpointUnit._message_received', new=Mock(side_effect=exception.IonException)):
retval = e._message_received(sentinel.msg, {})
self.assertEquals(retval, sentinel.sent)
assert_called_once_with_header(self, e.send, {'status_code': -1,
'error_message':'',
'conv-id': '',
'conv-seq': 2,
'protocol':'',
'performative': 'failure'})