コード例 #1
0
 def test_send_to_caller(self):
     request = Mock(response_queue=Mock(), id_=1234)
     client = ClientComms(Mock())
     client.requests = {1234: request}
     response = Mock(id=1234)
     client.send_to_caller(response)
     request.response_queue.put.assert_called_once_with(response)
コード例 #2
0
ファイル: test_clientcomms.py プロジェクト: ajgdls/pymalcolm
 def test_send_to_caller(self):
     request = Mock(response_queue=Mock(), id_=1234)
     client = ClientComms("c", Mock())
     client.requests = {1234:request}
     response = Mock(id_ = 1234)
     client.send_to_caller(response)
     request.response_queue.put.assert_called_once_with(response)
コード例 #3
0
 def test_send_to_caller_with_block_update(self):
     c = ClientComms(Mock())
     response = Update(id_=0)
     c.send_to_caller(response)
     c.process.update_block_list.assert_called_once_with(c, response.value)
コード例 #4
0
ファイル: test_clientcomms.py プロジェクト: ajgdls/pymalcolm
 def test_send_to_caller_with_block_update(self):
     c = ClientComms("c", Mock())
     response = Update(id_=0)
     c.send_to_caller(response)
     c.process.update_block_list.assert_called_once_with(c, response.value)