mock.sentinel.recv

Here are the examples of the python api mock.sentinel.recv 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_channel.py
    def test_recv(self):
        # replace recv_queue with a mock obj
        rqmock = Mock(spec=RecvChannel.SizeNotifyQueue)
        self.ch._recv_queue = rqmock

        rqmock.get.return_value = sentinel.recv

        m = self.ch.recv()

        self.assertEquals(m, sentinel.recv)

        self.assertTrue(rqmock.get.called)