Skip to content

Commit

Permalink
Fix broken test (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamBergamin authored Nov 17, 2023
1 parent a3f4bae commit 970956b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ def command_handler(ack):
)
try:
handler.client.wss_uri = "ws://localhost:3012/link"
handler.client.default_auto_reconnect_enabled = False

handler.connect()
assert handler.client.is_connected() is True
time.sleep(2) # wait for the message receiver
assert handler.client.is_connected() is True

handler.client.send_message("foo")

Expand Down
2 changes: 2 additions & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import asyncio


def remove_os_env_temporarily() -> dict:
old_env = os.environ.copy()
os.environ.clear()
Expand Down Expand Up @@ -28,6 +29,7 @@ def get_mock_server_mode() -> str:
else:
return mode


def get_event_loop():
try:
return asyncio.get_event_loop()
Expand Down

0 comments on commit 970956b

Please sign in to comment.