Handle already charging

Handle already charging
Small cleanup
This commit is contained in:
Brian Martin
2019-01-15 10:16:09 -05:00
parent 4ca9750738
commit 335ac6a7e1
2 changed files with 43 additions and 30 deletions
+3
View File
@@ -43,6 +43,9 @@ def test_handle_charge_state():
v._handle_ctl({'event': 'charge_state', 'type': 'idle'})
assert_equals('idle', v.charge_status)
v._handle_ctl({'event': 'charge_state', 'ret': 'fail', 'errno': '8'}) #Seen in IOT when already charging
assert_equals('charging', v.charge_status)
v._handle_ctl({'event': 'charge_state', 'type': 'a_type_not_supported_by_sucks'})
assert_equals('a_type_not_supported_by_sucks', v.charge_status)