def test_json_greater_than_fails(): validation = HttpValidation.get("url") exp = ExpectedJsonValueGreaterThan("path", 5) with pytest.raises(ValidationFailure): exp.validate_value(validation, 5, 5)
def test_json_greater_than_wildcard(): validation = HttpValidation.get("url") exp = ExpectedJsonValueGreaterThan("path[*]", [1, 2, 3]) with pytest.raises(ValidationFailure): exp.validate_value(validation, 1, [1, 2, 3])
def test_json_greater_than(): validation = HttpValidation.get("url") exp = ExpectedJsonValueGreaterThan("path", 5) exp.validate_value(validation, 5, 7)
def test_json_greater_than_fails(): validation = HttpValidation.get("url") exp = ExpectedJsonValueGreaterThan("path", 5) with pytest.raises(ValidationFailure): exp.validate_value(validation, 5, 5)
def test_json_greater_than_wildcard(): validation = HttpValidation.get("url") exp = ExpectedJsonValueGreaterThan("path[*]", [1, 2, 3]) with pytest.raises(ValidationFailure): exp.validate_value(validation, 1, [1, 2, 3])
def test_json_greater_than(): validation = HttpValidation.get("url") exp = ExpectedJsonValueGreaterThan("path", 5) exp.validate_value(validation, 5, 7)