allow None for rssi, add a missing newline to fakes.py

This commit is contained in:
Teemu Rytilahti 2017-08-05 17:33:08 +02:00
parent d648c6bd2b
commit 651331bb77
2 changed files with 2 additions and 1 deletions

View File

@ -265,6 +265,7 @@ sysinfo_lb110 = {'system': {
}
}}
def error(cls, target, cmd="no-command", msg="default msg"):
return {target: {cmd: {"err_code": -1323, "msg": msg}}}

View File

@ -59,7 +59,7 @@ class TestSmartPlugHS110(TestCase):
'oemId': str,
'on_time': int,
'relay_state': int,
'rssi': int, # apparently rssi can also be positive, see #54
'rssi': Any(int, None), # rssi can also be positive, see #54
'sw_ver': str,
'type': str,
'mic_type': str,