def test_post_state_to_ids(self, mock_post_state, mock_get_rooms_lights): mock_get_rooms_lights.return_value = dict() skill = SnipsHue("192.168.1.1", "username", [1, 2, 3, 4, 5]) skill._post_state_to_ids(dict(), None) self.assertFalse(mock_post_state.called)
def test_post_state_to_ids(self, mock_post_state, mock_get_rooms_lights): mock_get_rooms_lights.return_value = dict() skill = SnipsHue("192.168.1.1", "username", [1, 2, 3, 4, 5]) lights_id = range(1, 3) skill._post_state_to_ids(dict(), lights_id) self.assertEqual(mock_post_state.call_count, len(lights_id))