forked from p15670423/monkey
UT: Modify PropagationConfigurationSchema maximum depth validation test cases
This commit is contained in:
parent
a9fa7427f3
commit
c2052a57a8
|
@ -225,15 +225,14 @@ def test_propagation_configuration():
|
||||||
assert config_dict == PROPAGATION_CONFIGURATION
|
assert config_dict == PROPAGATION_CONFIGURATION
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("depth", [-1, 0])
|
def test_propagation_configuration__invalid_maximum_depth():
|
||||||
def test_propagation_configuration__invalid_maximum_depth(depth):
|
|
||||||
schema = PropagationConfigurationSchema()
|
schema = PropagationConfigurationSchema()
|
||||||
|
|
||||||
invalid_maximum_depth_configuration = PROPAGATION_CONFIGURATION.copy()
|
negative_maximum_depth_configuration = PROPAGATION_CONFIGURATION.copy()
|
||||||
invalid_maximum_depth_configuration["maximum_depth"] = depth
|
negative_maximum_depth_configuration["maximum_depth"] = -1
|
||||||
|
|
||||||
with pytest.raises(ValidationError):
|
with pytest.raises(ValidationError):
|
||||||
schema.load(invalid_maximum_depth_configuration)
|
schema.load(negative_maximum_depth_configuration)
|
||||||
|
|
||||||
|
|
||||||
def test_agent_configuration():
|
def test_agent_configuration():
|
||||||
|
|
Loading…
Reference in New Issue