From c2052a57a839739043954241b4d0d5a601779f8f Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 27 Jul 2022 18:50:50 +0530 Subject: [PATCH] UT: Modify PropagationConfigurationSchema maximum depth validation test cases --- .../common/configuration/test_agent_configuration.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/monkey/tests/unit_tests/common/configuration/test_agent_configuration.py b/monkey/tests/unit_tests/common/configuration/test_agent_configuration.py index 7a93fbe96..78f612384 100644 --- a/monkey/tests/unit_tests/common/configuration/test_agent_configuration.py +++ b/monkey/tests/unit_tests/common/configuration/test_agent_configuration.py @@ -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():