2022-07-16 21:54:41 +01:00
|
|
|
import pytest
|
|
|
|
|
2023-06-25 14:23:39 +01:00
|
|
|
from tests import data, vban
|
2022-07-16 21:54:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
class TestRemoteFactories:
|
|
|
|
__test__ = True
|
|
|
|
|
|
|
|
@pytest.mark.skipif(
|
2025-01-17 15:01:40 +00:00
|
|
|
data.name != 'basic',
|
|
|
|
reason='Skip test if kind is not basic',
|
2022-07-16 21:54:41 +01:00
|
|
|
)
|
|
|
|
def test_it_tests_remote_attrs_for_basic(self):
|
2025-01-17 15:01:40 +00:00
|
|
|
assert hasattr(vban, 'strip')
|
|
|
|
assert hasattr(vban, 'bus')
|
|
|
|
assert hasattr(vban, 'command')
|
|
|
|
assert hasattr(vban, 'button')
|
|
|
|
assert hasattr(vban, 'vban')
|
2022-07-16 21:54:41 +01:00
|
|
|
|
2023-06-25 14:23:39 +01:00
|
|
|
assert len(vban.strip) == 3
|
|
|
|
assert len(vban.bus) == 2
|
2023-07-12 10:24:03 +01:00
|
|
|
assert len(vban.button) == 80
|
|
|
|
assert len(vban.vban.instream) == 6 and len(vban.vban.outstream) == 5
|
2022-07-16 21:54:41 +01:00
|
|
|
|
|
|
|
@pytest.mark.skipif(
|
2025-01-17 15:01:40 +00:00
|
|
|
data.name != 'banana',
|
|
|
|
reason='Skip test if kind is not basic',
|
2022-07-16 21:54:41 +01:00
|
|
|
)
|
|
|
|
def test_it_tests_remote_attrs_for_banana(self):
|
2025-01-17 15:01:40 +00:00
|
|
|
assert hasattr(vban, 'strip')
|
|
|
|
assert hasattr(vban, 'bus')
|
|
|
|
assert hasattr(vban, 'command')
|
|
|
|
assert hasattr(vban, 'button')
|
|
|
|
assert hasattr(vban, 'vban')
|
2022-07-16 21:54:41 +01:00
|
|
|
|
2023-06-25 14:23:39 +01:00
|
|
|
assert len(vban.strip) == 5
|
|
|
|
assert len(vban.bus) == 5
|
2023-07-12 10:24:03 +01:00
|
|
|
assert len(vban.button) == 80
|
|
|
|
assert len(vban.vban.instream) == 10 and len(vban.vban.outstream) == 9
|
2022-07-16 21:54:41 +01:00
|
|
|
|
|
|
|
@pytest.mark.skipif(
|
2025-01-17 15:01:40 +00:00
|
|
|
data.name != 'potato',
|
|
|
|
reason='Skip test if kind is not basic',
|
2022-07-16 21:54:41 +01:00
|
|
|
)
|
|
|
|
def test_it_tests_remote_attrs_for_potato(self):
|
2025-01-17 15:01:40 +00:00
|
|
|
assert hasattr(vban, 'strip')
|
|
|
|
assert hasattr(vban, 'bus')
|
|
|
|
assert hasattr(vban, 'command')
|
|
|
|
assert hasattr(vban, 'button')
|
|
|
|
assert hasattr(vban, 'vban')
|
2022-07-16 21:54:41 +01:00
|
|
|
|
2023-06-25 14:23:39 +01:00
|
|
|
assert len(vban.strip) == 8
|
|
|
|
assert len(vban.bus) == 8
|
2023-07-12 10:24:03 +01:00
|
|
|
assert len(vban.button) == 80
|
|
|
|
assert len(vban.vban.instream) == 10 and len(vban.vban.outstream) == 9
|