xair-api-python/tests/x32/test_adapter.py

145 lines
3.4 KiB
Python
Raw Permalink Normal View History

2022-11-07 15:22:29 +00:00
import pytest
from tests.x32 import data, tests
""" STRIP TESTS """
class TestSetAndGetStripMuteHigher:
"""Mute"""
__test__ = True
def setup_class(self):
self.target = getattr(tests, "strip")[data.strip]
@pytest.mark.parametrize(
"param,value",
[("mute", True), ("mute", False)],
)
def test_it_sets_and_gets_strip_mute_bool_params(self, param, value):
setattr(self.target, param, value)
assert getattr(self.target, param) == value
2022-11-07 15:22:29 +00:00
class TestSetAndGetStripMixHigher:
"""Mix"""
__test__ = True
def setup_class(self):
self.target = getattr(tests, "strip")
self.target = getattr(self.target[data.strip], "mix")
@pytest.mark.parametrize(
"param,value",
[("on", True), ("on", False)],
)
def test_it_sets_and_gets_strip_bool_params(self, param, value):
setattr(self.target, param, value)
assert getattr(self.target, param) == value
""" BUS TESTS """
class TestSetAndGetBusConfigHigher:
"""Config"""
__test__ = True
def setup_class(self):
self.target = getattr(tests, "bus")
self.target = getattr(self.target[data.bus], "config")
@pytest.mark.parametrize(
"param,value",
[("color", 0), ("color", 15)],
)
def test_it_sets_and_gets_bus_int_params(self, param, value):
setattr(self.target, param, value)
assert getattr(self.target, param) == value
""" AUXIN TESTS """
class TestSetAndGetAuxInPreampHigher:
"""Preamp"""
2022-11-07 15:22:29 +00:00
__test__ = True
def setup_class(self):
self.target = getattr(tests, "auxin")
self.target = getattr(self.target[data.auxrtn], "preamp")
2022-11-07 15:22:29 +00:00
@pytest.mark.parametrize(
"param,value",
[("invert", True), ("invert", False)],
2022-11-07 15:22:29 +00:00
)
def test_it_sets_and_gets_auxrtn_bool_params(self, param, value):
2022-11-07 15:22:29 +00:00
setattr(self.target, param, value)
assert getattr(self.target, param) == value
""" FX RETURN TESTS """
class TestSetAndGetFXReturnEQHigher:
"""EQ"""
2022-11-07 15:22:29 +00:00
__test__ = True
def setup_class(self):
self.target = getattr(tests, "fxreturn")
self.target = getattr(self.target[data.fx], "eq")
2022-11-07 15:22:29 +00:00
@pytest.mark.parametrize(
"param,value",
[("on", True), ("on", False)],
2022-11-07 15:22:29 +00:00
)
def test_it_sets_and_gets_fxrtn_bool_params(self, param, value):
2022-11-07 15:22:29 +00:00
setattr(self.target, param, value)
assert getattr(self.target, param) == value
""" MATRIX TESTS """
class TestSetAndGetMatrixDynHigher:
"""Dyn"""
2022-11-07 15:22:29 +00:00
__test__ = True
def setup_class(self):
self.target = getattr(tests, "matrix")
self.target = getattr(self.target[data.matrix], "dyn")
2022-11-07 15:22:29 +00:00
@pytest.mark.parametrize(
"param,value",
[("mode", "comp"), ("mode", "exp")],
2022-11-07 15:22:29 +00:00
)
def test_it_sets_and_gets_matrix_string_params(self, param, value):
setattr(self.target, param, value)
assert getattr(self.target, param) == value
""" MAIN STEREO TESTS """
class TestSetAndGetMainStereoInsertHigher:
"""Insert"""
__test__ = True
def setup_class(self):
self.target = getattr(tests, "mainst")
@pytest.mark.parametrize(
"param,value",
[("mode", "comp"), ("mode", "exp")],
)
def test_it_sets_and_gets_mainst_string_params(self, param, value):
setattr(self.target, param, value)
assert getattr(self.target, param) == value