1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-06-11 02:18:40 -04:00

Fixed some unit tests

Fixed unit tests related to the updated static method signatures
of the client and drivers.
This commit is contained in:
2025-10-07 14:18:50 -04:00
parent 328c027ad3
commit af0feaf9c8
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ class TCPKISSDriver:
return client.TRANSPORT_TCPKISS
@staticmethod
def is_enabled(cls) -> bool:
def is_enabled() -> bool:
"""Check if KISS is enabled in configuration.
Returns:
+2 -2
View File
@@ -353,6 +353,7 @@ class TestAPRSISDriver(unittest.TestCase):
def test_consumer_success(self, mock_log):
"""Test consumer forwards callback to client."""
self.driver._client = self.mock_client
self.driver.connected = True
mock_callback = mock.MagicMock()
self.driver.consumer(mock_callback, raw=True)
@@ -365,6 +366,7 @@ class TestAPRSISDriver(unittest.TestCase):
def test_consumer_exception(self, mock_log):
"""Test consumer handles exceptions."""
self.driver._client = self.mock_client
self.driver.connected = True
mock_callback = mock.MagicMock()
test_error = Exception('Test error')
self.mock_client.consumer.side_effect = test_error
@@ -381,8 +383,6 @@ class TestAPRSISDriver(unittest.TestCase):
mock_callback = mock.MagicMock()
self.driver.consumer(mock_callback)
mock_log.warning.assert_called_once()
self.assertFalse(self.driver.connected)
def test_stats_configured_with_client(self):