Esempio n. 1
0
def test_json_less_than_fails():
    validation = HttpValidation.get("url")
    exp = ExpectedJsonValueLessThan("path", 5)
    with pytest.raises(ValidationFailure):
        exp.validate_value(validation, 5, 5)
Esempio n. 2
0
def test_json_less_than_wildcard():
    validation = HttpValidation.get("url")
    exp = ExpectedJsonValueLessThan("path[*]", [1, 2, 3])
    with pytest.raises(ValidationFailure):
        exp.validate_value(validation, 1, [1, 2, 3])
Esempio n. 3
0
def test_json_less_than():
    validation = HttpValidation.get("url")
    exp = ExpectedJsonValueLessThan("path", 5)
    exp.validate_value(validation, 5, 3)
def test_json_less_than_fails():
    validation = HttpValidation.get("url")
    exp = ExpectedJsonValueLessThan("path", 5)
    with pytest.raises(ValidationFailure):
        exp.validate_value(validation, 5, 5)
def test_json_less_than_wildcard():
    validation = HttpValidation.get("url")
    exp = ExpectedJsonValueLessThan("path[*]", [1, 2, 3])
    with pytest.raises(ValidationFailure):
        exp.validate_value(validation, 1, [1, 2, 3])
def test_json_less_than():
    validation = HttpValidation.get("url")
    exp = ExpectedJsonValueLessThan("path", 5)
    exp.validate_value(validation, 5, 3)