#NEWLINE# def test___getitem__calls_all_read_subscribers_uses_last_result( self ) : #NEWLINE# #INDENT# subject = self . _make_subject ( ) #NEWLINE# mem = ObservableMemory ( subject = subject ) #NEWLINE# calls = [ ] #NEWLINE# def read_subscriber_1( address ) : #NEWLINE# #INDENT# calls . append ( 'read_subscriber_1' ) #NEWLINE# return 1 #NEWLINE# #UNINDENT# def read_subscriber_2( address ) : #NEWLINE# #INDENT# calls . append ( 'read_subscriber_2' ) #NEWLINE# return 2 #NEWLINE# #UNINDENT# mem . subscribe_to_read ( [ 49152 ] , read_subscriber_1 ) #NEWLINE# mem . subscribe_to_read ( [ 49152 ] , read_subscriber_2 ) #NEWLINE# subject [ 49152 ] = 171 #NEWLINE# self . assertEqual ( 2 , mem [ 49152 ] ) #NEWLINE# expected_calls = [ 'read_subscriber_1' , 'read_subscriber_2' ] #NEWLINE# self . assertEqual ( expected_calls , calls )