#NEWLINE# def assertThatHeartbeatsWereSent( self , heartbeats ) : #NEWLINE# #INDENT# heartbeats = [ self . make_heartbeat ( state ) for state in heartbeats ] #NEWLINE# sent_heartbeats = [ parseHeartbeatMessage ( message ) for message in self . master_socket . sent_messages ] #NEWLINE# self . assertEquals ( message , sent_heartbeats )