1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 20:35:55 +00:00

Return default network connection (#2115)

This commit is contained in:
Pascal Vizeli
2020-10-12 09:13:27 +02:00
committed by GitHub
parent 4c525de5e2
commit ac4277cd7b
2 changed files with 24 additions and 2 deletions

View File

@@ -18,6 +18,16 @@ async def test_api_network_interface_info(api_client):
resp = await api_client.get(f"/network/interface/{TEST_INTERFACE}/info")
result = await resp.json()
assert result["data"]["ip_address"] == "192.168.2.148/24"
assert result["data"]["interface"] == TEST_INTERFACE
@pytest.mark.asyncio
async def test_api_network_interface_info_default(api_client):
"""Test network manager default api."""
resp = await api_client.get("/network/interface/default/info")
result = await resp.json()
assert result["data"]["ip_address"] == "192.168.2.148/24"
assert result["data"]["interface"] == TEST_INTERFACE
@pytest.mark.asyncio