#NEWLINE# def test_wol_success( self ) : #NEWLINE# #INDENT# '\n        tests network.wol success\n        ' #NEWLINE# mac = '080027136977' #NEWLINE# bcast = '255.255.255.255 7' #NEWLINE# class MockSocket ( object ) : #NEWLINE# #INDENT# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# def __call__( self , * args , **kwargs ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# def setsockopt( self , * args , **kwargs ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# def sendto( self , * args , **kwargs ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# with patch ( 'socket.socket' , MockSocket ) : #NEWLINE# #INDENT# self . assertTrue ( network . wol ( self , bcast ) )