tests: Test call order in test_recv_callback_gets_no_data
This commit is contained in:
parent
265951bf00
commit
15597b3c60
@ -7,7 +7,7 @@ import unittest
|
||||
|
||||
import gobject
|
||||
|
||||
from mock import Mock, patch, sentinel
|
||||
from mock import Mock, call, patch, sentinel
|
||||
|
||||
import pykka
|
||||
|
||||
@ -418,8 +418,11 @@ class ConnectionTest(unittest.TestCase):
|
||||
|
||||
self.assertTrue(network.Connection.recv_callback(
|
||||
self.mock, sentinel.fd, gobject.IO_IN))
|
||||
self.mock.disable_recv.assert_called_once_with()
|
||||
self.mock.actor_ref.tell.assert_called_once_with({'close': True})
|
||||
self.assertEqual(self.mock.mock_calls, [
|
||||
call.sock.recv(any_int),
|
||||
call.disable_recv(),
|
||||
call.actor_ref.tell({'close': True}),
|
||||
])
|
||||
|
||||
def test_recv_callback_recoverable_error(self):
|
||||
self.mock.sock = Mock(spec=socket.SocketType)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user