UT: Add test for ICMPScanConfigurationSchema timeout validation

This commit is contained in:
Shreya Malviya 2022-07-27 16:51:17 +05:30
parent d8bccde276
commit 65ce50cac1
1 changed files with 10 additions and 0 deletions

View File

@ -126,6 +126,16 @@ def test_icmp_scan_configuration_schema():
assert config.timeout == TIMEOUT
def test_icmp_scan_configuration_schema__negative_timeout():
schema = ICMPScanConfigurationSchema()
negative_timeout_configuration = ICMP_CONFIGURATION.copy()
negative_timeout_configuration["timeout"] = -1
with pytest.raises(ValidationError):
schema.load(negative_timeout_configuration)
def test_tcp_scan_configuration_schema():
schema = TCPScanConfigurationSchema()