#NEWLINE# def test( self ) : #NEWLINE# #INDENT# with self . context : #NEWLINE# #INDENT# self . context . set ( 'foo' , True ) #NEWLINE# self . context . set ( 'bar.baz' , 10.0 ) #NEWLINE# #UNINDENT# ( event_meta , raw_data ) = self . server . recv_multipart ( ) #NEWLINE# network . check_meta_version ( event_meta ) #NEWLINE# ( _ , event_time , event_host , event_type ) = struct . unpack ( network . META_STRUCT_FMT , event_type ) #NEWLINE# assert_equal ( event_type , 'test' ) #NEWLINE# data = msgpack . unpackb ( raw_data ) #NEWLINE# assert_equal ( data [ 'id' ] , 1 ) #NEWLINE# assert_equal ( data [ 'type' ] , 'test' ) #NEWLINE# assert_equal ( utils . get_deep ( data [ 'body' ] , 'bar.baz' ) , 10.0 )