diff options
author | Devaev Maxim <[email protected]> | 2021-02-06 19:27:00 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2021-02-06 19:27:00 +0300 |
commit | 63aa4a07a72276eb065196ce1900a046f76ff3e0 (patch) | |
tree | 36ee78a679c14335db7017c865e975d33762f7aa /testenv | |
parent | c36d931ee37d0486dd77370e8bd36aa7f7193d0d (diff) |
refactored streamer params, added h264 gop
Diffstat (limited to 'testenv')
-rw-r--r-- | testenv/tests/validators/test_kvm.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testenv/tests/validators/test_kvm.py b/testenv/tests/validators/test_kvm.py index b0058fde..c6ba4436 100644 --- a/testenv/tests/validators/test_kvm.py +++ b/testenv/tests/validators/test_kvm.py @@ -33,6 +33,7 @@ from kvmd.validators.kvm import valid_stream_quality from kvmd.validators.kvm import valid_stream_fps from kvmd.validators.kvm import valid_stream_resolution from kvmd.validators.kvm import valid_stream_h264_bitrate +from kvmd.validators.kvm import valid_stream_h264_gop # ===== @@ -141,3 +142,17 @@ def test_ok__valid_stream_h264_bitrate(arg: Any) -> None: def test_fail__valid_stream_h264_bitrate(arg: Any) -> None: with pytest.raises(ValidatorError): print(valid_stream_h264_bitrate(arg)) + + +# ===== [email protected]("arg", ["1 ", 0, 60]) +def test_ok__valid_stream_h264_gop(arg: Any) -> None: + value = valid_stream_h264_gop(arg) + assert type(value) == int # pylint: disable=unidiomatic-typecheck + assert value == int(str(arg).strip()) + + [email protected]("arg", ["test", "", None, 61, 1.1]) +def test_fail__valid_stream_h264_gop(arg: Any) -> None: + with pytest.raises(ValidatorError): + print(valid_stream_h264_gop(arg)) |