1
0
mirror of https://github.com/craigerl/aprsd.git synced 2025-02-03 09:44:15 -05:00

Fixed broken unit tests

This patch fixes some broken unit tests with the aprsis client.
This commit is contained in:
Hemna 2024-11-21 09:01:19 -05:00
parent c372e1a1e9
commit c82e9ba597
2 changed files with 11 additions and 4 deletions

View File

@ -37,8 +37,8 @@ class APRSISClient(base.APRSClient):
stats = {
"connected": self.is_connected,
"filter": self.filter,
"keepalive": keepalive,
"login_status": self.login_status,
"server_keepalive": keepalive,
"server_string": server_string,
"transport": self.transport(),
}

View File

@ -53,12 +53,19 @@ class TestAPRSISClient(unittest.TestCase):
with mock.patch.object(APRSISClient, "is_configured", return_value=True):
stats = self.client.stats()
from rich.console import Console
c = Console()
c.print(stats)
self.assertEqual(
{
"server_string": mock_client.server_string,
"sever_keepalive": mock_client.aprsd_keepalive,
"connected": True,
"filter": "m/50",
}, stats,
"login_status": {"message": mock.ANY, "success": True},
"server_keepalive": mock_client.aprsd_keepalive,
"server_string": mock_client.server_string,
"transport": "aprsis",
},
stats,
)
def test_is_configured_missing_login(self):