Add tests, and fix some edge cases revealed by tests (yay!)

This commit is contained in:
Greg Laabs
2018-07-15 15:19:40 -07:00
parent 269749e0ea
commit df44def7c5
3 changed files with 210 additions and 13 deletions
+12
View File
@@ -59,6 +59,18 @@ def test_stop_command():
b'<ctl td="Clean"><clean speed="standard" type="stop" /></ctl>')
def test_play_sound_command():
c = PlaySound()
assert_equals(ElementTree.tostring(c.to_xml()),
b'<ctl sid="0" td="PlaySound" />')
def test_play_sound_command_with_sid():
c = PlaySound(sid="1")
assert_equals(ElementTree.tostring(c.to_xml()),
b'<ctl sid="1" td="PlaySound" />')
def test_get_clean_state_command():
c = GetCleanState()
assert_equals(ElementTree.tostring(c.to_xml()),