Add tests and pretty output for HS220, fix minor issues in tests

This commit is contained in:
Teemu Rytilahti
2018-10-18 19:57:44 +02:00
parent 345216e245
commit 8d4f4a6de3
5 changed files with 96 additions and 13 deletions

View File

@@ -119,6 +119,9 @@ class SmartDevice(object):
raise SmartDeviceException("Error on {}.{}: {}"
.format(target, cmd, result))
if cmd not in result:
raise SmartDeviceException("No command in response: {}"
.format(response))
result = result[cmd]
del result["err_code"]