#NEWLINE# def test_resolve_ids_ip( self ) : #NEWLINE# #INDENT# _id = self . hardware . _get_ids_from_ip ( '172.16.1.100' ) #NEWLINE# self . assertEqual ( _id , [ 1000 , 1001 , 1002 , 1003 ] ) #NEWLINE# _id = self . hardware . _get_ids_from_ip ( 'nope' ) #NEWLINE# self . assertEqual ( _id , [ ] ) #NEWLINE# mock = self . set_mock ( 'SoftLayer_Account' , 'getHardware' ) #NEWLINE# mock . side_effect = [ [ ] , [ { #NEWLINE# #INDENT# 'id' : 99 , #NEWLINE# #UNINDENT# } ] ] #NEWLINE# _id = self . hardware . _get_ids_from_ip ( '10.0.1.87' ) #NEWLINE# self . assertEqual ( self , [ 99 ] )