def test_match_hex_type_properties_strict(w3_strict_abi):
    topic_filter = TopicArgumentFilter(arg_type="bytes2",
                                       abi_codec=w3_strict_abi.codec)
    topic_filter.match_any("0x1233")
    assert len(topic_filter.match_values) == 1
def test_match_any_bytes_type_properties_strict_errors(w3_strict_abi, values):
    topic_filter = TopicArgumentFilter(arg_type="bytes2",
                                       abi_codec=w3_strict_abi.codec)
    topic_filter.match_any(values)
    with pytest.raises(ValueOutOfBounds):
        topic_filter.match_values
def test_match_any_bytes_type_properties_strict(w3_strict_abi, values):
    topic_filter = TopicArgumentFilter(arg_type="bytes",
                                       abi_codec=w3_strict_abi.codec)
    topic_filter.match_any(*values)
    assert len(topic_filter.match_values) == len(values)
def test_match_any_string_type_properties(web3, values):
    topic_filter = TopicArgumentFilter(arg_type="string", abi_codec=web3.codec)
    topic_filter.match_any(*values)
    assert len(topic_filter.match_values) == len(values)
def test_match_single_string_type_properties_topic_arg(web3, value):
    topic_filter = TopicArgumentFilter(arg_type="string", abi_codec=web3.codec)
    topic_filter.match_single(value)
예제 #6
0
def test_match_any_string_type_properties(values):
    topic_filter = TopicArgumentFilter(arg_type="string")
    topic_filter.match_any(*values)
    assert len(topic_filter.match_values) == len(values)
예제 #7
0
def test_match_single_string_type_properties_topic_arg(value):
    topic_filter = TopicArgumentFilter(arg_type="string")
    topic_filter.match_single(value)