Exemplo n.º 1
0
def test_string_equal_satisfied(arg, against, result):
    c = Equal(arg)
    assert result == c.satisfied(against)
    # test after (de)serialization
    assert result == Equal.from_json(Equal(arg).to_json()).satisfied(against)
    # test deprecated class
    with pytest.deprecated_call():
        c = StringEqualRule(arg)
        assert result == c.satisfied(against)
Exemplo n.º 2
0
def test_string_equal_insensitive_satisfied(arg, against, result):
    c = Equal(arg, ci=True)
    assert result == c.satisfied(against)
    # test after (de)serialization
    assert result == Equal.from_json(c.to_json()).satisfied(against)