mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-01 04:38:12 +00:00
Fix Docker console test.
This commit is contained in:
parent
bec2270334
commit
58b2ee152d
@ -671,7 +671,7 @@ class DockerVM(BaseNode):
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
msg = await ws.receive()
|
msg = await ws.receive()
|
||||||
if msg.type == aiohttp.WSMsgType.text:
|
if msg.type == aiohttp.WSMsgType.TEXT:
|
||||||
out.feed_data(msg.data.encode())
|
out.feed_data(msg.data.encode())
|
||||||
elif msg.type == aiohttp.WSMsgType.BINARY:
|
elif msg.type == aiohttp.WSMsgType.BINARY:
|
||||||
out.feed_data(msg.data)
|
out.feed_data(msg.data)
|
||||||
|
@ -1037,11 +1037,11 @@ def test_read_console_output_with_binary_mode(vm, loop):
|
|||||||
async def receive(self):
|
async def receive(self):
|
||||||
if not self.sent:
|
if not self.sent:
|
||||||
self.sent = True
|
self.sent = True
|
||||||
return MagicMock(tp=aiohttp.WSMsgType.BINARY, data=b"test")
|
return MagicMock(type=aiohttp.WSMsgType.BINARY, data=b"test")
|
||||||
else:
|
else:
|
||||||
return MagicMock(tp=aiohttp.WSMsgType.CLOSE)
|
return MagicMock(type=aiohttp.WSMsgType.CLOSE)
|
||||||
|
|
||||||
def close(self):
|
async def close(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
input_stream = InputStreamMock()
|
input_stream = InputStreamMock()
|
||||||
|
Loading…
Reference in New Issue
Block a user