UT: Modify PropagationConfigurationSchema maximum depth validation test cases

This commit is contained in:
Shreya Malviya 2022-07-27 18:50:50 +05:30
parent a9fa7427f3
commit c2052a57a8
1 changed files with 4 additions and 5 deletions

View File

@ -225,15 +225,14 @@ def test_propagation_configuration():
assert config_dict == PROPAGATION_CONFIGURATION
@pytest.mark.parametrize("depth", [-1, 0])
def test_propagation_configuration__invalid_maximum_depth(depth):
def test_propagation_configuration__invalid_maximum_depth():
schema = PropagationConfigurationSchema()
invalid_maximum_depth_configuration = PROPAGATION_CONFIGURATION.copy()
invalid_maximum_depth_configuration["maximum_depth"] = depth
negative_maximum_depth_configuration = PROPAGATION_CONFIGURATION.copy()
negative_maximum_depth_configuration["maximum_depth"] = -1
with pytest.raises(ValidationError):
schema.load(invalid_maximum_depth_configuration)
schema.load(negative_maximum_depth_configuration)
def test_agent_configuration():