import pytest from argos.schemas.config import SSL def test_ssl_duration_parsing(): data = {"thresholds": [{"2d": "warning"}, {"3w": "error"}]} # Test the validation and parsing of SSL model ssl_object = SSL(**data) assert len(ssl_object.thresholds) == 2 assert ssl_object.thresholds == [(2, "warning"), (21, "error")] # Test the constraint on severity with pytest.raises(ValueError): erroneous_data = {"thresholds": [{"1d": "caution"}, {"1w": "danger"}]} SSL(**erroneous_data)