<s> from serfclient import result <EOL> class TestSerfResult ( object ) : <EOL> def test_initialises_to_none ( self ) : <EOL> r = result . SerfResult ( ) <EOL> assert r . head is None <EOL> assert r . body is None <EOL> def test_provides_a_pretty_printed_form_for_repl_use ( self ) : <EOL> r = result . SerfResult ( head = { "<STR_LIT:a>" : <NUM_LIT:1> } , body = ( '<STR_LIT:foo>' , '<STR_LIT:bar>' ) ) <EOL> assert str ( r ) == "<STR_LIT>" <EOL> def test_can_convert_to_list ( self ) : <EOL> r = result . SerfResult ( head = <NUM_LIT:1> , body = <NUM_LIT:2> ) <EOL> assert sorted ( list ( r ) ) == [ <NUM_LIT:1> , <NUM_LIT:2> ] <EOL> def test_can_convert_to_tuple ( self ) : <EOL> r = result . SerfResult ( head = <NUM_LIT:1> , body = <NUM_LIT:2> ) <EOL> assert sorted ( tuple ( r ) ) == [ <NUM_LIT:1> , <NUM_LIT:2> ] </s>
