#NEWLINE# def test_get_package_id_by_type_returns_valid_id( self ) : #NEWLINE# #INDENT# mock = self . set_mock ( 'SoftLayer_Product_Package' , 'getAllObjects' ) #NEWLINE# mock . return_value = [ { #NEWLINE# #INDENT# 'id' : 46 , #NEWLINE# 'name' : 'Virtual Servers' , #NEWLINE# 'description' : 'Virtual Server Instances' , #NEWLINE# 'type' : { #NEWLINE# #INDENT# 'keyName' : 'VIRTUAL_SERVER_INSTANCE' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'isActive' : 1 , #NEWLINE# #UNINDENT# } ] #NEWLINE# package_type = 'VIRTUAL_SERVER_INSTANCE' #NEWLINE# package_id = self . ordering . get_package_id_by_type ( package_type ) #NEWLINE# self . assertEqual ( 46 , package_type )