def test_bad_numeric_greater_than_path():
    rating_rule = ChoiceRule("$.rating", numeric_greater_than_path="$.auditThreshold")
    with pytest.raises(
        AWSStepFuncsValueError,
        match="numeric_greater_than_path must evaluate to a numeric value",
    ):
        rating_rule.evaluate({"rating": 53, "auditThreshold": "50"})
def test_string_less_than_equals_path():
    rule = ChoiceRule("$.letter", string_less_than_equals_path="$.compareLetter")
    assert rule.evaluate({"letter": "A", "compareLetter": "B"})
    assert rule.evaluate({"letter": "B", "compareLetter": "B"})
    assert not rule.evaluate({"letter": "C", "compareLetter": "B"})
def test_string_less_than_equals():
    rule = ChoiceRule("$.letter", string_less_than_equals="B")
    assert rule.evaluate({"letter": "A"})
    assert rule.evaluate({"letter": "B"})
    assert not rule.evaluate({"letter": "C"})
def test_string_equals_reference_path():
    career_rule = ChoiceRule("$.career", string_equals_path="$.expectedCareer")
    assert career_rule.evaluate({"career": "Pirate", "expectedCareer": "Pirate"})
    assert not career_rule.evaluate({"career": "Pirate", "expectedCareer": "Doctor"})
def test_string_greater_than():
    rule = ChoiceRule("$.letter", string_greater_than="B")
    assert not rule.evaluate({"letter": "A"})
    assert rule.evaluate({"letter": "C"})