From 651331bb775a35be513a1b187274628a63bf1575 Mon Sep 17 00:00:00 2001 From: Teemu Rytilahti Date: Sat, 5 Aug 2017 17:33:08 +0200 Subject: [PATCH] allow None for rssi, add a missing newline to fakes.py --- pyHS100/tests/fakes.py | 1 + pyHS100/tests/test_pyHS100.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyHS100/tests/fakes.py b/pyHS100/tests/fakes.py index 983cd519..cbff15c8 100644 --- a/pyHS100/tests/fakes.py +++ b/pyHS100/tests/fakes.py @@ -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}}} diff --git a/pyHS100/tests/test_pyHS100.py b/pyHS100/tests/test_pyHS100.py index d43dbc53..0d7721a2 100644 --- a/pyHS100/tests/test_pyHS100.py +++ b/pyHS100/tests/test_pyHS100.py @@ -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,