Add KP125M(US) hw 1.0 fw 1.4.1 and S505D(US) hw 1.0 fw 1.4.0 fixtures (#1836)

Two fixtures from devices that advertise the TPAP encryption type: KP125M(US) fw 1.4.1 from RayMa, and S505D(US) fw 1.4.0 Build 260611 from michael-bohr (dumped with `devtools/dump_devinfo.py`). Their commits keep their authorship, and `SUPPORTED.md` is regenerated.

---------

Co-authored-by: RayMa <88625717+RayWangyangMa@users.noreply.github.com>
Co-authored-by: michael-bohr <mjbohr@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZeliardM
2026-11-04 12:58:31 -05:00
committed by GitHub
parent 1c3be98e67
commit 0d9bed88a6
4 changed files with 1050 additions and 0 deletions

View File

@@ -149,6 +149,12 @@ async def discovery_mock(request: pytest.FixtureRequest, mocker: MockerFixture):
return patch_discovery({DISCOVERY_MOCK_IP: fixture_info}, mocker)
def _xfail_tpap(discovery_result: dict) -> None:
"""Mark tests of devices that advertise TPAP as expected to fail."""
if discovery_result.get("mgt_encrypt_schm", {}).get("encrypt_type") == "TPAP":
pytest.xfail("TPAP encryption is not supported yet")
def create_discovery_mock(ip: str, fixture_data: dict):
"""Mock discovery and patch protocol queries to use Fake protocols."""
@@ -194,6 +200,7 @@ def create_discovery_mock(ip: str, fixture_data: dict):
encrypt_type = discovery_result["mgt_encrypt_schm"].get(
"encrypt_type", discovery_result.get("encrypt_info", {}).get("sym_schm")
)
_xfail_tpap(discovery_result)
if not (login_version := discovery_result["mgt_encrypt_schm"].get("lv")) and (
et := discovery_result.get("encrypt_type")
@@ -380,6 +387,7 @@ def discovery_data(request: pytest.FixtureRequest, mocker: MockerFixture):
mocker.patch("kasa.IotProtocol.query", return_value=fixture_data)
mocker.patch("kasa.SmartProtocol.query", return_value=fixture_data)
if "discovery_result" in fixture_data:
_xfail_tpap(fixture_data["discovery_result"]["result"])
return fixture_data["discovery_result"].copy()
else:
return {"system": {"get_sysinfo": fixture_data["system"]["get_sysinfo"]}}