We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b5ccc7 commit 7a83ad5Copy full SHA for 7a83ad5
tests/test_charge_point.py
@@ -44,15 +44,18 @@ async def test_cms_responses(hass):
44
cp = ChargePoint("CP_1_test", ws)
45
loop = True
46
while loop:
47
- await asyncio.gather(
+ out = await asyncio.gather(
48
cp.start(),
49
cp.send_boot_notification(),
50
cp.send_start_transaction(),
51
cp.send_meter_data(),
52
cp.send_stop_transaction(),
53
)
54
- await asyncio.sleep(10)
55
- loop = False
+ if ws.closed:
+ ws = websockets.connect("ws://localhost:9000/CP_1", subprotocols=["ocpp1.6"], close_timeout = 10)
56
+ await asyncio.sleep(1)
57
+ if out.done():
58
+ loop = False
59
60
class ChargePoint(cpclass):
61
"""Representation of real client Charge Point."""
0 commit comments