diff options
Diffstat (limited to 'testenv')
-rw-r--r-- | testenv/tests/validators/test_hw.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testenv/tests/validators/test_hw.py b/testenv/tests/validators/test_hw.py index 2956375c..bcc3531f 100644 --- a/testenv/tests/validators/test_hw.py +++ b/testenv/tests/validators/test_hw.py @@ -30,6 +30,7 @@ from kvmd.validators.hw import valid_gpio_pin from kvmd.validators.hw import valid_gpio_pin_optional from kvmd.validators.hw import valid_otg_gadget from kvmd.validators.hw import valid_otg_id +from kvmd.validators.hw import valid_otg_ethernet # ===== @@ -117,3 +118,15 @@ def test_ok__valid_otg_id(arg: Any) -> None: def test_fail__valid_otg_id(arg: Any) -> None: with pytest.raises(ValidatorError): print(valid_otg_id(arg)) + + +# ===== [email protected]("arg", ["ECM ", "EeM ", "ncm ", " Rndis"]) +def test_ok__valid_otg_ethernet(arg: Any) -> None: + assert valid_otg_ethernet(arg) == arg.strip().lower() + + [email protected]("arg", ["test", "", None]) +def test_fail__valid_otg_ethernet(arg: Any) -> None: + with pytest.raises(ValidatorError): + print(valid_otg_ethernet(arg)) |