mock.sentinel.msg_return

Here are the examples of the python api mock.sentinel.msg_return taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: pyon Source File: test_endpoint.py
Function: test_message_received
    def test__message_received(self):
        self._endpoint_unit.message_received  = Mock()
        self._endpoint_unit.message_received.return_value = sentinel.msg_return

        retval = self._endpoint_unit._message_received(sentinel.msg, sentinel.headers)

        self.assertEquals(retval, sentinel.msg_return)

        self.assertTrue(self._endpoint_unit.message_received.called)