@@ -316,8 +316,9 @@ 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 = 'id, description, capacity, itemCategory, '
320+ 'keyName, prices[categories], '
321+ 'softwareDescription[id,referenceCode,longDescription]' )
321322 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
322323
323324 def test_get_price_id_list_no_core (self ):
@@ -335,22 +336,24 @@ def test_get_price_id_list_no_core(self):
335336 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], None )
336337
337338 list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
338- 'prices[categories]' )
339+ 'prices[categories], softwareDescription[id,referenceCode,longDescription ]' )
339340 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
340341
341342 def test_get_price_id_list_item_not_found (self ):
342343 category1 = {'categoryCode' : 'cat1' }
343344 price1 = {'id' : 1234 , 'locationGroupId' : '' , 'categories' : [category1 ]}
344- item1 = {'id' : 1111 , 'keyName' : 'ITEM1' , 'itemCategory' : category1 , 'prices' : [price1 ]}
345+ softwareDescription1 = {'id' : 1234 , 'longDescription' : 'ABCD 1.2-34' , 'referenceCode' : 'ABCD_9_32' }
346+ item1 = {'id' : 1111 , 'keyName' : 'ITEM1' , 'itemCategory' : category1 ,
347+ 'prices' : [price1 ], 'softwareDescription' : [softwareDescription1 ], }
345348
346349 with mock .patch .object (self .ordering , 'list_items' ) as list_mock :
347350 list_mock .return_value = [item1 ]
348351
349352 exc = self .assertRaises (exceptions .SoftLayerError ,
350353 self .ordering .get_price_id_list ,
351- 'PACKAGE_KEYNAME' , ['ITEM2' ], "8 " )
354+ 'PACKAGE_KEYNAME' , ['ITEM2' ], "12 " )
352355 list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
353- 'prices[categories]' )
356+ 'prices[categories], softwareDescription[id,referenceCode,longDescription ]' )
354357 self .assertEqual ("Item ITEM2 does not exist for package PACKAGE_KEYNAME" , str (exc ))
355358
356359 def test_get_price_id_list_gpu_items_with_two_categories (self ):
@@ -365,7 +368,8 @@ def test_get_price_id_list_gpu_items_with_two_categories(self):
365368 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM1' ], "8" )
366369
367370 list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, '
368- 'keyName, ' 'prices[categories]' )
371+ 'keyName, prices[categories], '
372+ 'softwareDescription[id,referenceCode,longDescription]' )
369373 self .assertEqual ([price2 ['id' ], price1 ['id' ]], prices )
370374
371375 def test_generate_no_complex_type (self ):
@@ -620,7 +624,7 @@ def test_location_group_id_none(self):
620624 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], "8" )
621625
622626 list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
623- 'prices[categories]' )
627+ 'prices[categories], softwareDescription[id,referenceCode,longDescription ]' )
624628 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
625629
626630 def test_location_groud_id_empty (self ):
@@ -637,8 +641,9 @@ def test_location_groud_id_empty(self):
637641
638642 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], "8" )
639643
640- list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
641- 'prices[categories]' )
644+ list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, '
645+ 'keyName, prices[categories], '
646+ 'softwareDescription[id,referenceCode,longDescription]' )
642647 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
643648
644649 def test_get_item_price_id_without_capacity_restriction (self ):
0 commit comments