#NEWLINE# @ mock . patch ( ( VMTASKS_UTILS + '.sys' ) ) #NEWLINE# @ mock . patch ( 'subprocess.Popen' ) #NEWLINE# def test__ping_ip_address_other_os( self , mock_popen , mock_sys ) : #NEWLINE# #INDENT# mock_popen . return_value . returncode = 0 #NEWLINE# mock_sys . platform = 'freebsd10' #NEWLINE# host = utils . Host ( '1.2.3.4' ) #NEWLINE# self . assertEqual ( utils . Host . ICMP_UP_STATUS , utils . Host . update_status ( host ) . status ) #NEWLINE# mock_popen . assert_called_once_with ( [ 'ping' , '-c1' , str ( self . ip ) ] , stderr = subprocess . PIPE , stdout = subprocess . PIPE ) #NEWLINE# mock_popen . return_value . wait . assert_called_once_with ( )