コード例 #1
0
    def test_get_hue_saturation(self, mock_get_rooms_lights):
        mock_get_rooms_lights.return_value = dict()

        skill = SnipsHue("192.168.1.1", "username", [1, 2, 3])
        self.assertIsNotNone(skill._get_hue_saturation(None))
コード例 #2
0
    def test_color_map(self, mock_get_rooms_lights):
        skill = SnipsHue("192.168.1.1", "username", ['1', '2', '3'])

        self.assertEqual(skill._get_hue_saturation('red'), {'hue': 2869, 'sat': 255})
        self.assertEqual(skill._get_hue_saturation('blue'), {'hue': 44161, 'sat': 255})
        self.assertEqual(skill._get_hue_saturation('green'), {'hue': 21845, 'sat': 255})