#NEWLINE# def test_start( self ) : #NEWLINE# #INDENT# mock_zmq_context = mock . Mock ( spec = zmq . Context ) #NEWLINE# testPeer = peer . Peer ( mock_zmq_context , 'local_identity' , 'peer_identity' ) #NEWLINE# testPeer . start ( ) #NEWLINE# mock_connect = testPeer . _zmq_dealer . connect #NEWLINE# mock_connect . assert_called_once_with ( 'tcp://peer_identity' ) #NEWLINE# assert testPeer . _is_started