@@ -316,8 +316,7 @@ def test_get_price_id_list(self):
316316
317317 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], "8" )
318318
319- list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
320- 'prices[categories]' )
319+ list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = self .ordering .package_mask )
321320 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
322321
323322 def test_get_price_id_list_no_core (self ):
@@ -335,22 +334,24 @@ def test_get_price_id_list_no_core(self):
335334 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], None )
336335
337336 list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
338- 'prices[categories]' )
337+ 'prices[categories], softwareDescription[id,referenceCode,longDescription ]' )
339338 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
340339
341340 def test_get_price_id_list_item_not_found (self ):
342341 category1 = {'categoryCode' : 'cat1' }
343342 price1 = {'id' : 1234 , 'locationGroupId' : '' , 'categories' : [category1 ]}
344- item1 = {'id' : 1111 , 'keyName' : 'ITEM1' , 'itemCategory' : category1 , 'prices' : [price1 ]}
343+ softwareDescription1 = {'id' : 1234 , 'longDescription' : 'ABCD 1.2-34' , 'referenceCode' : 'ABCD_9_32' }
344+ item1 = {'id' : 1111 , 'keyName' : 'ITEM1' , 'itemCategory' : category1 ,
345+ 'prices' : [price1 ], 'softwareDescription' : softwareDescription1 , }
345346
346347 with mock .patch .object (self .ordering , 'list_items' ) as list_mock :
347348 list_mock .return_value = [item1 ]
348349
349350 exc = self .assertRaises (exceptions .SoftLayerError ,
350351 self .ordering .get_price_id_list ,
351- 'PACKAGE_KEYNAME' , ['ITEM2' ], "8 " )
352+ 'PACKAGE_KEYNAME' , ['ITEM2' ], "12 " )
352353 list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
353- 'prices[categories]' )
354+ 'prices[categories], softwareDescription[id,referenceCode,longDescription ]' )
354355 self .assertEqual ("Item ITEM2 does not exist for package PACKAGE_KEYNAME" , str (exc ))
355356
356357 def test_get_price_id_list_gpu_items_with_two_categories (self ):
@@ -365,7 +366,8 @@ def test_get_price_id_list_gpu_items_with_two_categories(self):
365366 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM1' ], "8" )
366367
367368 list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, '
368- 'keyName, ' 'prices[categories]' )
369+ 'keyName, prices[categories], '
370+ 'softwareDescription[id,referenceCode,longDescription]' )
369371 self .assertEqual ([price2 ['id' ], price1 ['id' ]], prices )
370372
371373 def test_generate_no_complex_type (self ):
@@ -620,7 +622,7 @@ def test_location_group_id_none(self):
620622 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], "8" )
621623
622624 list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
623- 'prices[categories]' )
625+ 'prices[categories], softwareDescription[id,referenceCode,longDescription ]' )
624626 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
625627
626628 def test_location_groud_id_empty (self ):
@@ -637,8 +639,9 @@ def test_location_groud_id_empty(self):
637639
638640 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], "8" )
639641
640- list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
641- 'prices[categories]' )
642+ list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, '
643+ 'keyName, prices[categories], '
644+ 'softwareDescription[id,referenceCode,longDescription]' )
642645 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
643646
644647 def test_get_item_price_id_without_capacity_restriction (self ):
0 commit comments