1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
"""Tests for the access point module."""
from __future__ import annotations
import pytest
from asusrouter.modules.access_point import AccessPoint
@pytest.mark.parametrize(
("mac", "ssid", "hidden", "mac_fh", "ssid_fh"),
[
("mac", "ssid", True, "mac_fh", "ssid_fh"),
("mac", "ssid", False, "mac_fh", "ssid_fh"),
("mac", "ssid", True, None, None),
("mac", "ssid", False, None, None),
(None, None, None, None, None),
],
)
def test_access_point(
mac: str | None,
ssid: str | None,
hidden: bool,
mac_fh: str | None,
ssid_fh: str | None,
) -> None:
"""Test the access point class."""
# Create the access point
access_point = AccessPoint(
mac=mac,
ssid=ssid,
hidden=hidden,
mac_fh=mac_fh,
ssid_fh=ssid_fh,
)
# Check the access point
assert access_point.mac == mac
assert access_point.ssid == ssid
assert access_point.hidden == hidden
assert access_point.mac_fh == mac_fh
assert access_point.ssid_fh == ssid_fh
|