diff --git a/neon_utils/skills/kiosk_skill.py b/neon_utils/skills/kiosk_skill.py index ac8b9793..16247556 100644 --- a/neon_utils/skills/kiosk_skill.py +++ b/neon_utils/skills/kiosk_skill.py @@ -198,8 +198,7 @@ def stop(self): if user in self._active_users: self.end_interaction(message) - def _on_event_error(self, error, message, handler_info, - skill_data, speak_errors): + def _on_event_error(self, error, message, *args, **kwargs): """ Override error handling to speak custom exception for active sessions """ @@ -208,5 +207,4 @@ def _on_event_error(self, error, message, handler_info, LOG.exception(error) self.handle_error(message) else: - super()._on_event_error(error, message, handler_info, - skill_data, speak_errors) + super()._on_event_error(error, message, *args, **kwargs) diff --git a/tests/net_util_tests.py b/tests/net_util_tests.py index 3f6c0048..9be1faa7 100644 --- a/tests/net_util_tests.py +++ b/tests/net_util_tests.py @@ -33,6 +33,8 @@ sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) +TCP_TEST = "mq.neonaiservices.com" + class NetUtilTests(unittest.TestCase): @classmethod @@ -119,18 +121,18 @@ def mock_socket(*args, **kwargs): def test_check_url_connection_invalid_url(self): from neon_utils.net_utils import check_url_response - self.assertFalse(check_url_response("https://api.neon.ai")) + self.assertFalse(check_url_response(f"https://{TCP_TEST}")) def test_check_online_valid_online(self): from neon_utils.net_utils import check_online self.assertTrue(check_online()) self.assertTrue(check_online(("google.com", "github.com"))) - self.assertTrue(check_online(("api.neon.ai", "google.com"))) + self.assertTrue(check_online((TCP_TEST, "google.com"))) self.assertTrue(check_online(("", "google.com"))) def test_check_online_invalid_offline(self): from neon_utils.net_utils import check_online - self.assertFalse(check_online(("api.neon.ai",))) + self.assertFalse(check_online((TCP_TEST,))) self.assertFalse(check_online(("",))) def test_check_online_valid_offline(self): @@ -152,7 +154,7 @@ def test_check_online_invalid_params(self): def test_check_port_is_open(self): from neon_utils.net_utils import check_port_is_open - self.assertTrue(check_port_is_open("api.neon.ai", 5672)) + self.assertTrue(check_port_is_open(TCP_TEST, 5672)) self.assertFalse(check_port_is_open("www.neon.ai", 5672))