Example #1
0
 async def test_keep_light(self):
     handler = MessageHandler()
     [x, y, z] = lights.accel_to_color(0, 0, 255)
     handler.set_light_data([int(x), int(y), int(z)])
     print("Original light:", handler.get_light_data())
     handler.set_new_message(True)
     result = await lights.keep_light(handler)
     self.assertEqual("Finished", result)
     self.assertEqual([255, 255, 0], handler.get_light_data())
Example #2
0
 def test_set_light(self):
     handler = MessageHandler()
     [x, y, z] = lights.accel_to_color(0, 0, 255)
     handler.set_light_data([int(x), int(y), int(z)])
     lights.set_light(handler)
     self.assertEqual([255, 255, 0], handler.get_light_data())