#NEWLINE# def test_follower_server_on_receive_message_where_log_is_empty_and_receives_its_first_value( self ) : #NEWLINE# #INDENT# msg = AppendEntriesMessage ( 0 , 1 , 2 , { #NEWLINE# #INDENT# 'prevLogIndex' : 0 , #NEWLINE# 'prevLogTerm' : 100 , #NEWLINE# 'leaderCommit' : 1 , #NEWLINE# 'entries' : [ { #NEWLINE# #INDENT# 'term' : 1 , #NEWLINE# 'value' : 100 , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . server . on_message ( msg ) #NEWLINE# self . assertEquals ( { #NEWLINE# #INDENT# 'term' : 1 , #NEWLINE# 'value' : 100 , #NEWLINE# #UNINDENT# } , self . server . _log [ 0 ] )