supervisor/tests/utils/test_check_port.py
Pascal Vizeli 4ac7f7dcf0
Rename Hass.io -> Supervisor ()
* Rename Hass.io -> Supervisor

* part 2

* fix lint

* fix auth name
2020-02-21 17:55:41 +01:00

15 lines
355 B
Python

"""Check ports."""
from ipaddress import ip_address
from supervisor.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)