from xml.etree import ElementTree from nose.tools import assert_equals from sucks import * def test_clean_command(): c = Clean(10) assert_equals(c.terminal, False) assert_equals(c.wait, 10) assert_equals(ElementTree.tostring(c.to_xml()), b'') # protocol has attribs in other order def test_charge_command(): c = Charge() assert_equals(c.terminal, True) assert_equals(ElementTree.tostring(c.to_xml()), b'') def test_stop_command(): c = Stop() assert_equals(c.terminal, True) assert_equals(ElementTree.tostring(c.to_xml()), b'')