mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-05-07 19:38:39 +00:00

* Support pip progress for HA 0.94 * fix black * add tests * add test for adguard * Fix lint
15 lines
351 B
Python
15 lines
351 B
Python
"""Check ports."""
|
|
from ipaddress import ip_address
|
|
|
|
from hassio.utils import check_port
|
|
|
|
|
|
def test_exists_open_port():
|
|
"""Test a exists network port."""
|
|
assert check_port(ip_address("8.8.8.8"), 53)
|
|
|
|
|
|
def test_not_exists_port():
|
|
"""Test a not exists network service."""
|
|
assert not check_port(ip_address("192.0.2.1"), 53)
|