Skip to content

Commit 445468c

Browse files
committed
update test
1 parent d82713a commit 445468c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

tests/Cloud/test_CustomCloud.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
def mock_scan(network):
2121
return ['MockModem']
2222

23+
def mock_disconnect(network):
24+
return True
25+
2326
@pytest.fixture
2427
def no_modem(monkeypatch):
2528
monkeypatch.setattr(Network, '_scan_for_modems', mock_scan)
2629
monkeypatch.setattr(Network, '_modemHandlers', {'MockModem': MockModem})
30+
monkeypatch.setattr(Network, 'disconnect', mock_disconnect)
2731

2832

2933
def test_create_send(no_modem):

tests/MockModem.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,12 @@ def __init__(self, device_name=None, baud_rate='9600',
2222
self.last_read_payload_length = 0
2323
self.result = ModemResult.OK
2424
self.debug_out = ''
25-
self.in_ext = False
25+
self.in_ext = False
26+
self._ppp = None
27+
28+
def is_connected(self):
29+
return True
30+
31+
@property
32+
def localIPAddress(self):
33+
return "0.0.0.0"

0 commit comments

Comments
 (0)