From 53fcd86432539cda833e694c67609c9dd23f4f7f Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Wed, 23 Nov 2022 20:46:02 -0600 Subject: [PATCH 1/2] use 127.0.0.1 instead of localhost --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index d4eaadb..28cbe10 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -30,7 +30,7 @@ async def yws_server(request): except Exception: kwargs = {} websocket_server = WebsocketServer(**kwargs) - async with serve(websocket_server.serve, "localhost", 1234): + async with serve(websocket_server.serve, "127.0.0.1", 1234): yield websocket_server From 0aaa5a11425d0cfe1e1974bea92a047528c955e5 Mon Sep 17 00:00:00 2001 From: David Brochart Date: Thu, 24 Nov 2022 07:22:13 +0100 Subject: [PATCH 2/2] More 127.0.0.1 --- tests/test_ypy_yjs.py | 2 +- tests/yjs_client_0.js | 2 +- tests/yjs_client_1.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_ypy_yjs.py b/tests/test_ypy_yjs.py index 842fca5..2876356 100644 --- a/tests/test_ypy_yjs.py +++ b/tests/test_ypy_yjs.py @@ -39,7 +39,7 @@ def callback(event): async def test_ypy_yjs_0(yws_server, yjs_client): ydoc = Y.YDoc() ytest = YTest(ydoc) - websocket = await connect("ws://localhost:1234/my-roomname") + websocket = await connect("ws://127.0.0.1:1234/my-roomname") WebsocketProvider(ydoc, websocket) ymap = ydoc.get_map("map") # set a value in "in" diff --git a/tests/yjs_client_0.js b/tests/yjs_client_0.js index df6f12f..3e8f7a6 100644 --- a/tests/yjs_client_0.js +++ b/tests/yjs_client_0.js @@ -7,7 +7,7 @@ const ymap = ydoc.getMap('map') const ws = require('ws') const wsProvider = new WebsocketProvider( - 'ws://localhost:1234', 'my-roomname', + 'ws://127.0.0.1:1234', 'my-roomname', ydoc, { WebSocketPolyfill: ws } ) diff --git a/tests/yjs_client_1.js b/tests/yjs_client_1.js index 769cd6a..655331d 100644 --- a/tests/yjs_client_1.js +++ b/tests/yjs_client_1.js @@ -8,7 +8,7 @@ const ystate = ydoc.getMap("state") const ws = require('ws') const wsProvider = new WebsocketProvider( - 'ws://localhost:1234', 'my-roomname', + 'ws://127.0.0.1:1234', 'my-roomname', ydoc, { WebSocketPolyfill: ws } )