Skip to content

Commit

Permalink
fix:log_spam
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Oct 15, 2024
1 parent 15d0420 commit 7219a13
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/unittests/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_handle_gui_disconnected(self, mock_is_gui_connected):
self.assertFalse(self.skill_manager._gui_event.is_set())
self.assertTrue(self.skill_manager._unload_on_gui_disconnect.called)

@patch('ovos_core.skill_manager.is_connected', return_value=True)
@patch('ovos_core.skill_manager.is_connected_http', return_value=True)
def test_handle_internet_connected(self, mock_is_connected):
self.skill_manager._connected_event.clear()
self.skill_manager._network_event.clear()
Expand All @@ -60,7 +60,7 @@ def test_handle_internet_connected(self, mock_is_connected):
self.assertTrue(self.skill_manager._network_loaded.is_set())
self.assertTrue(self.skill_manager._load_on_internet.called)

@patch('ovos_core.skill_manager.is_connected', return_value=False)
@patch('ovos_core.skill_manager.is_connected_http', return_value=False)
def test_handle_internet_disconnected(self, mock_is_connected):
self.skill_manager._allow_state_reloads = True
self.skill_manager._connected_event.set()
Expand All @@ -70,15 +70,15 @@ def test_handle_internet_disconnected(self, mock_is_connected):
self.assertFalse(self.skill_manager._connected_event.is_set())
self.assertTrue(self.skill_manager._unload_on_internet_disconnect.called)

@patch('ovos_core.skill_manager.is_connected', return_value=True)
@patch('ovos_core.skill_manager.is_connected_http', return_value=True)
def test_handle_network_connected(self, mock_is_connected):
self.skill_manager._network_event.clear()
self.skill_manager._load_on_network = MagicMock()
self.skill_manager.handle_network_connected(Message(""))
self.assertTrue(self.skill_manager._network_event.is_set())
self.assertTrue(self.skill_manager._load_on_network.called)

@patch('ovos_core.skill_manager.is_connected', return_value=False)
@patch('ovos_core.skill_manager.is_connected_http', return_value=False)
def test_handle_network_disconnected(self, mock_is_connected):
self.skill_manager._allow_state_reloads = True
self.skill_manager._network_event.set()
Expand All @@ -88,7 +88,7 @@ def test_handle_network_disconnected(self, mock_is_connected):
self.assertTrue(self.skill_manager._unload_on_network_disconnect.called)

@patch('ovos_core.skill_manager.is_gui_connected', return_value=True)
@patch('ovos_core.skill_manager.is_connected', return_value=True)
@patch('ovos_core.skill_manager.is_connected_http', return_value=True)
def test_sync_skill_loading_state_no_phal_plugin(self, mock_is_connected, mock_is_gui_connected):
self.bus.wait_for_response.return_value = None

Expand Down

0 comments on commit 7219a13

Please sign in to comment.