<s> '''<STR_LIT>''' <EOL> from circuits import Event <EOL> from circuits . core import Value <EOL> from circuits . node . utils import dump_event , load_event , dump_value , load_value <EOL> class test ( Event ) : <EOL> '''<STR_LIT>''' <EOL> def test_events ( ) : <EOL> event = test ( <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , foo = '<STR_LIT:bar>' ) <EOL> event . success = True <EOL> event . failure = False <EOL> event . test_meta = <NUM_LIT:1> <EOL> id = <NUM_LIT:1> <EOL> s = dump_event ( event , id ) <EOL> event , id = load_event ( s ) <EOL> assert hasattr ( event , '<STR_LIT:args>' ) <EOL> assert hasattr ( event , '<STR_LIT>' ) <EOL> assert hasattr ( event , '<STR_LIT:success>' ) <EOL> assert hasattr ( event , '<STR_LIT>' ) <EOL> assert hasattr ( event , '<STR_LIT>' ) <EOL> assert hasattr ( event , '<STR_LIT>' ) <EOL> assert hasattr ( event , '<STR_LIT>' ) <EOL> def test_values ( ) : <EOL> event = Event ( ) <EOL> event . test_meta = <NUM_LIT:1> <EOL> value = Value ( event = event ) <EOL> value . value = '<STR_LIT:foo>' <EOL> value . errors = False <EOL> value . node_call_id = <NUM_LIT:1> <EOL> x , id , errors , meta = load_value ( dump_value ( value ) ) <EOL> assert value . value == x <EOL> assert id == <NUM_LIT:1> <EOL> assert not errors <EOL> assert meta [ '<STR_LIT>' ] == event . test_meta </s>
