feat(k1): add USB networking, device management and acquisition recovery
This commit is contained in:
@@ -109,3 +109,19 @@ def test_duplicate_id_cannot_replace_original_secret():
|
||||
duplicate["parameters"]["password"] += "changed"
|
||||
bus.submit(fleet, "vehicle", duplicate)
|
||||
assert bus.pending[("vehicle", request["operation_id"])]["payload"] == request
|
||||
|
||||
|
||||
def test_reset_accepts_only_a_mode_revision_without_credentials_or_physical_action():
|
||||
value = command()
|
||||
value.update(action="reset", parameters={"mode_revision": 7})
|
||||
validate(value)
|
||||
for parameters in (
|
||||
{},
|
||||
{"mode_revision": True},
|
||||
{"mode_revision": -1},
|
||||
{"mode_revision": "7"},
|
||||
{"mode_revision": 7, "device_id": "x"},
|
||||
{"mode_revision": 7, "password": "synthetic"},
|
||||
):
|
||||
with pytest.raises(PairingError):
|
||||
validate({**value, "parameters": parameters})
|
||||
|
||||
Reference in New Issue
Block a user