summaryrefslogtreecommitdiff
path: root/testenv/tests
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2020-11-03 04:50:08 +0300
committerGitHub <[email protected]>2020-11-03 04:50:08 +0300
commit544f4b3fecb84e2ae21eb71ec0c37c8bec38261c (patch)
tree9199dba963bf8dde4cf4137f61b0cb5119fb7159 /testenv/tests
parent6ec82dde5d4eb4b52956fff2029f33c4e651b919 (diff)
Relative (#18)
* refactoring * basic relative mouse mode
Diffstat (limited to 'testenv/tests')
-rw-r--r--testenv/tests/validators/test_kvm.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/testenv/tests/validators/test_kvm.py b/testenv/tests/validators/test_kvm.py
index 2f6df4cd..5e758f18 100644
--- a/testenv/tests/validators/test_kvm.py
+++ b/testenv/tests/validators/test_kvm.py
@@ -38,7 +38,7 @@ from kvmd.validators.kvm import valid_stream_resolution
from kvmd.validators.kvm import valid_hid_key
from kvmd.validators.kvm import valid_hid_mouse_move
from kvmd.validators.kvm import valid_hid_mouse_button
-from kvmd.validators.kvm import valid_hid_mouse_wheel
+from kvmd.validators.kvm import valid_hid_mouse_delta
from kvmd.validators.kvm import valid_ugpio_driver
from kvmd.validators.kvm import valid_ugpio_channel
from kvmd.validators.kvm import valid_ugpio_mode
@@ -188,22 +188,22 @@ def test_fail__valid_hid_mouse_button(arg: Any) -> None:
# =====
@pytest.mark.parametrize("arg", [-100, "1 ", "-1", 1, -1, 0, "100 "])
-def test_ok__valid_hid_mouse_wheel(arg: Any) -> None:
- assert valid_hid_mouse_wheel(arg) == int(str(arg).strip())
+def test_ok__valid_hid_mouse_delta(arg: Any) -> None:
+ assert valid_hid_mouse_delta(arg) == int(str(arg).strip())
-def test_ok__valid_hid_mouse_wheel__m200() -> None:
- assert valid_hid_mouse_wheel(-200) == -127
+def test_ok__valid_hid_mouse_delta__m200() -> None:
+ assert valid_hid_mouse_delta(-200) == -127
-def test_ok__valid_hid_mouse_wheel__p200() -> None:
- assert valid_hid_mouse_wheel(200) == 127
+def test_ok__valid_hid_mouse_delta__p200() -> None:
+ assert valid_hid_mouse_delta(200) == 127
@pytest.mark.parametrize("arg", ["test", "", None, 1.1])
-def test_fail__valid_hid_mouse_wheel(arg: Any) -> None:
+def test_fail__valid_hid_mouse_delta(arg: Any) -> None:
with pytest.raises(ValidatorError):
- print(valid_hid_mouse_wheel(arg))
+ print(valid_hid_mouse_delta(arg))
# =====