@@ -309,7 +309,7 @@ def test_get_price_id_list(self):
309309
310310 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], "8" )
311311
312- list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, capacity, itemCategory, keyName, '
312+ list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
313313 'prices[categories]' )
314314 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
315315
@@ -327,7 +327,7 @@ def test_get_price_id_list_no_core(self):
327327
328328 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], None )
329329
330- list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, capacity, itemCategory, keyName, '
330+ list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
331331 'prices[categories]' )
332332 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
333333
@@ -342,7 +342,7 @@ def test_get_price_id_list_item_not_found(self):
342342 exc = self .assertRaises (exceptions .SoftLayerError ,
343343 self .ordering .get_price_id_list ,
344344 'PACKAGE_KEYNAME' , ['ITEM2' ], "8" )
345- list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, capacity, itemCategory, keyName, '
345+ list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
346346 'prices[categories]' )
347347 self .assertEqual ("Item ITEM2 does not exist for package PACKAGE_KEYNAME" , str (exc ))
348348
@@ -357,8 +357,8 @@ def test_get_price_id_list_gpu_items_with_two_categories(self):
357357
358358 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM1' ], "8" )
359359
360- list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, capacity, itemCategory, keyName , '
361- 'prices[categories]' )
360+ list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory , '
361+ 'keyName, ' ' prices[categories]' )
362362 self .assertEqual ([price2 ['id' ], price1 ['id' ]], prices )
363363
364364 def test_generate_no_complex_type (self ):
@@ -608,7 +608,7 @@ def test_location_group_id_none(self):
608608
609609 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], "8" )
610610
611- list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, capacity, itemCategory, keyName, '
611+ list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
612612 'prices[categories]' )
613613 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
614614
@@ -626,7 +626,7 @@ def test_location_groud_id_empty(self):
626626
627627 prices = self .ordering .get_price_id_list ('PACKAGE_KEYNAME' , ['ITEM1' , 'ITEM2' ], "8" )
628628
629- list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, capacity, itemCategory, keyName, '
629+ list_mock .assert_called_once_with ('PACKAGE_KEYNAME' , mask = 'id, description, capacity, itemCategory, keyName, '
630630 'prices[categories]' )
631631 self .assertEqual ([price1 ['id' ], price2 ['id' ]], prices )
632632
@@ -673,11 +673,10 @@ def test_issues1067(self):
673673 {
674674 'id' : 10453 ,
675675 'itemCategory' : {'categoryCode' : 'server' },
676+ "description" : "Dual Intel Xeon Silver 4110 (16 Cores, 2.10 GHz)" ,
676677 'keyName' : 'INTEL_INTEL_XEON_4110_2_10' ,
677678 'prices' : [
678679 {
679- 'capacityRestrictionMaximum' : '2' ,
680- 'capacityRestrictionMinimum' : '2' ,
681680 'capacityRestrictionType' : 'PROCESSOR' ,
682681 'categories' : [{'categoryCode' : 'os' }],
683682 'id' : 201161 ,
@@ -744,3 +743,21 @@ def test_get_item_capacity_storage(self):
744743 item_capacity = self .ordering .get_item_capacity (items , ['READHEAVY_TIER' , 'STORAGE_SPACE_FOR_2_IOPS_PER_GB' ])
745744
746745 self .assertEqual (1 , int (item_capacity ))
746+
747+ def test_get_item_capacity_intel (self ):
748+
749+ items = [{
750+ "capacity" : "1" ,
751+ "id" : 6131 ,
752+ "description" : "Dual Intel Xeon E5-2690 v3 (24 Cores, 2.60 GHz)" ,
753+ "keyName" : "INTEL_XEON_2690_2_60" ,
754+ },
755+ {
756+ "capacity" : "1" ,
757+ "id" : 10201 ,
758+ "keyName" : "GUEST_CORE_1_DEDICATED" ,
759+ }]
760+
761+ item_capacity = self .ordering .get_item_capacity (items , ['INTEL_XEON_2690_2_60' , 'BANDWIDTH_20000_GB' ])
762+
763+ self .assertEqual (24 , int (item_capacity ))
0 commit comments