Fix tests & Clean

Fix tests
Add tests for iot
Modify Clean to use kwargs for SpotArea
This commit is contained in:
Brian Martin
2019-01-14 10:59:25 -05:00
parent ef0bd2e90d
commit d317e4b913
6 changed files with 171 additions and 25 deletions
+3 -3
View File
@@ -270,18 +270,18 @@ def test_handle_unknown_ctl():
# plus errors!
def test_bot_address():
v = a_vacbot(bot={"did": "E0000000001234567890", "class": "126", "nick": "bob"})
v = a_vacbot(bot={"did": "E0000000001234567890", "class": "126", "nick": "bob", "iot":False})
assert_equals('E0000000001234567890@126.ecorobot.net/atom', v._vacuum_address())
def test_model_variation():
v = a_vacbot(bot={"did": "E0000000001234567890", "class": "141", "nick": "bob"})
v = a_vacbot(bot={"did": "E0000000001234567890", "class": "141", "nick": "bob","iot":False})
assert_equals('E0000000001234567890@141.ecorobot.net/atom', v._vacuum_address())
def a_vacbot(bot=None, monitor=False):
if bot is None:
bot = {"did": "E0000000001234567890", "class": "126", "nick": "bob"}
bot = {"did": "E0000000001234567890", "class": "126", "nick": "bob", "iot": False}
return VacBot('20170101abcdefabcdefa', 'ecouser.net', 'abcdef12', 'A1b2C3d4efghijklmNOPQrstuvwxyz12',
bot, 'na', monitor=monitor)