test: placeholders for the serial number and MAC addresses in fixtures
driver / lint (pull_request) Successful in 16s
driver / standard (pull_request) Successful in 18s
driver / types (pull_request) Successful in 1m5s
driver / test (3.13) (pull_request) Successful in 57s
driver / test (3.12) (pull_request) Successful in 1m13s
driver / lowest (pull_request) Successful in 27s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m13s
CI / driver (pull_request) Successful in 2m28s
driver / publish (pull_request) Skipped

The fixtures are a real gateway's answers. Its serial number and its MAC
addresses identify that one device and do not belong in a public
repository; the tests only need values of the right shape. The MACs keep
Zyxel's OUI.
This commit is contained in:
Christian Manivong committed 2026-11-12 18:32:40 +01:00
1 parent 23dbfb7650
commit a282836bd2
2 files changed
+9 -8

No files matched your search

+4 -3
View File
@@ -12,7 +12,8 @@ from (#27).
``BASIC_INFO`` and ``SYSTEM`` are those two answers from that gateway (the SNMP
community strings the System answer can carry are left out), ``STATUS`` its
``cardpage_status`` cut down to ``DeviceInfo`` and one interface.
``cardpage_status`` cut down to ``DeviceInfo`` and one interface, with the serial
number replaced by a placeholder.
"""
from __future__ import annotations
@@ -46,7 +47,7 @@ STATUS: dict[str, Any] = {
{
"DeviceInfo": {
"ModelName": "VMG4005-B50A",
"SerialNumber": "S250Y02049498",
"SerialNumber": "S000Y00000001",
"SoftwareVersion": "V5.17(ABQA.3.1)C0",
"UpTime": 13544274,
},
@@ -145,7 +146,7 @@ def test_get_facts_raises_on_a_system_page_it_cannot_read(answer: Any):
def test_the_serial_number_is_the_one_on_the_status_page():
assert _driver().get_facts()["serial_number"] == "S250Y02049498"
assert _driver().get_facts()["serial_number"] == "S000Y00000001"
def test_the_uptime_is_the_one_on_the_status_page():