mirror of
https://github.com/craigerl/aprsd.git
synced 2025-06-15 12:52:26 -04:00
Fixed broken unit tests
This patch fixes some broken unit tests with the aprsis client.
This commit is contained in:
parent
c372e1a1e9
commit
c82e9ba597
@ -37,8 +37,8 @@ class APRSISClient(base.APRSClient):
|
|||||||
stats = {
|
stats = {
|
||||||
"connected": self.is_connected,
|
"connected": self.is_connected,
|
||||||
"filter": self.filter,
|
"filter": self.filter,
|
||||||
"keepalive": keepalive,
|
|
||||||
"login_status": self.login_status,
|
"login_status": self.login_status,
|
||||||
|
"server_keepalive": keepalive,
|
||||||
"server_string": server_string,
|
"server_string": server_string,
|
||||||
"transport": self.transport(),
|
"transport": self.transport(),
|
||||||
}
|
}
|
||||||
|
@ -53,12 +53,19 @@ class TestAPRSISClient(unittest.TestCase):
|
|||||||
|
|
||||||
with mock.patch.object(APRSISClient, "is_configured", return_value=True):
|
with mock.patch.object(APRSISClient, "is_configured", return_value=True):
|
||||||
stats = self.client.stats()
|
stats = self.client.stats()
|
||||||
|
from rich.console import Console
|
||||||
|
c = Console()
|
||||||
|
c.print(stats)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
{
|
{
|
||||||
"server_string": mock_client.server_string,
|
"connected": True,
|
||||||
"sever_keepalive": mock_client.aprsd_keepalive,
|
|
||||||
"filter": "m/50",
|
"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):
|
def test_is_configured_missing_login(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user