@@ -327,7 +327,7 @@ def test_cancel_running_transaction(self):
327327 'activeTransaction' : {'id' : 4567 }}
328328 self .assertRaises (SoftLayer .SoftLayerError ,
329329 self .hardware .cancel_hardware ,
330- 12345 )
330+ 12345 )
331331
332332 def test_change_port_speed_public (self ):
333333 self .hardware .change_port_speed (2 , True , 100 )
@@ -426,8 +426,10 @@ def test_get_tracking_id(self):
426426
427427 def test_get_bandwidth_data (self ):
428428 result = self .hardware .get_bandwidth_data (1234 , '2019-01-01' , '2019-02-01' , 'public' , 1000 )
429- self .assert_called_with ('SoftLayer_Metric_Tracking_Object' , 'getBandwidthData' , args = ('2019-01-01' , '2019-02-01' ,
430- 'public' , 1000 ), identifier = 1000 )
429+ self .assert_called_with ('SoftLayer_Metric_Tracking_Object' ,
430+ 'getBandwidthData' ,
431+ args = ('2019-01-01' , '2019-02-01' , 'public' , 1000 ),
432+ identifier = 1000 )
431433 self .assertEqual (result [0 ]['type' ], 'cpu0' )
432434
433435 def test_get_bandwidth_allocation (self ):
@@ -447,9 +449,9 @@ def test_get_extra_price_id_no_items(self):
447449
448450 def test_get_extra_price_mismatched (self ):
449451 items = [
450- {'keyName' : 'TEST' , 'prices' :[{'id' :1 , 'locationGroupId' : None , 'recurringFee' :99 }]},
451- {'keyName' : 'TEST' , 'prices' :[{'id' :2 , 'locationGroupId' : 55 , 'hourlyRecurringFee' :99 }]},
452- {'keyName' : 'TEST' , 'prices' :[{'id' :3 , 'locationGroupId' : None , 'hourlyRecurringFee' :99 }]},
452+ {'keyName' : 'TEST' , 'prices' : [{'id' : 1 , 'locationGroupId' : None , 'recurringFee' : 99 }]},
453+ {'keyName' : 'TEST' , 'prices' : [{'id' : 2 , 'locationGroupId' : 55 , 'hourlyRecurringFee' : 99 }]},
454+ {'keyName' : 'TEST' , 'prices' : [{'id' : 3 , 'locationGroupId' : None , 'hourlyRecurringFee' : 99 }]},
453455 ]
454456 location = {
455457 'location' : {
@@ -466,18 +468,18 @@ def test_get_extra_price_mismatched(self):
466468
467469 def test_get_bandwidth_price_mismatched (self ):
468470 items = [
469- {'itemCategory' : {'categoryCode' :'bandwidth' },
470- 'capacity' : 100 ,
471- 'prices' :[{'id' :1 , 'locationGroupId' : None , 'hourlyRecurringFee' :99 }]
472- },
473- {'itemCategory' : {'categoryCode' :'bandwidth' },
474- 'capacity' : 100 ,
475- 'prices' :[{'id' :2 , 'locationGroupId' : 55 , 'recurringFee' :99 }]
476- },
477- {'itemCategory' : {'categoryCode' :'bandwidth' },
478- 'capacity' : 100 ,
479- 'prices' :[{'id' :3 , 'locationGroupId' : None , 'recurringFee' :99 }]
480- },
471+ {'itemCategory' : {'categoryCode' : 'bandwidth' },
472+ 'capacity' : 100 ,
473+ 'prices' : [{'id' : 1 , 'locationGroupId' : None , 'hourlyRecurringFee' : 99 }]
474+ },
475+ {'itemCategory' : {'categoryCode' : 'bandwidth' },
476+ 'capacity' : 100 ,
477+ 'prices' : [{'id' : 2 , 'locationGroupId' : 55 , 'recurringFee' : 99 }]
478+ },
479+ {'itemCategory' : {'categoryCode' : 'bandwidth' },
480+ 'capacity' : 100 ,
481+ 'prices' : [{'id' : 3 , 'locationGroupId' : None , 'recurringFee' : 99 }]
482+ },
481483 ]
482484 location = {
483485 'location' : {
@@ -494,14 +496,14 @@ def test_get_bandwidth_price_mismatched(self):
494496
495497 def test_get_os_price_mismatched (self ):
496498 items = [
497- {'itemCategory' : {'categoryCode' :'os' },
498- 'softwareDescription' : {'referenceCode' : 'TEST_OS' },
499- 'prices' :[{'id' :2 , 'locationGroupId' : 55 , 'recurringFee' :99 }]
500- },
501- {'itemCategory' : {'categoryCode' :'os' },
502- 'softwareDescription' : {'referenceCode' : 'TEST_OS' },
503- 'prices' :[{'id' :3 , 'locationGroupId' : None , 'recurringFee' :99 }]
504- },
499+ {'itemCategory' : {'categoryCode' : 'os' },
500+ 'softwareDescription' : {'referenceCode' : 'TEST_OS' },
501+ 'prices' : [{'id' : 2 , 'locationGroupId' : 55 , 'recurringFee' : 99 }]
502+ },
503+ {'itemCategory' : {'categoryCode' : 'os' },
504+ 'softwareDescription' : {'referenceCode' : 'TEST_OS' },
505+ 'prices' : [{'id' : 3 , 'locationGroupId' : None , 'recurringFee' : 99 }]
506+ },
505507 ]
506508 location = {
507509 'location' : {
@@ -514,7 +516,7 @@ def test_get_os_price_mismatched(self):
514516 }
515517 }
516518 result = managers .hardware ._get_os_price_id (items , 'TEST_OS' , location )
517- self .assertEqual (3 , result )
519+ self .assertEqual (3 , result )
518520
519521 def test_get_default_price_id_item_not_first (self ):
520522 items = [{
@@ -557,31 +559,31 @@ def test_get_port_speed_price_id_no_items(self):
557559
558560 def test_get_port_speed_price_id_mismatch (self ):
559561 items = [
560- {'itemCategory' : {'categoryCode' :'port_speed' },
561- 'capacity' :101 ,
562- 'attributes' :[{'attributeTypeKeyName' : 'IS_PRIVATE_NETWORK_ONLY' }],
563- 'prices' :[{'id' :1 , 'locationGroupId' : None , 'recurringFee' :99 }]
564- },
565- {'itemCategory' : {'categoryCode' :'port_speed' },
566- 'capacity' :100 ,
567- 'attributes' :[{'attributeTypeKeyName' : 'IS_NOT_PRIVATE_NETWORK_ONLY' }],
568- 'prices' :[{'id' :2 , 'locationGroupId' : 55 , 'recurringFee' :99 }]
569- },
570- {'itemCategory' : {'categoryCode' :'port_speed' },
571- 'capacity' :100 ,
572- 'attributes' :[{'attributeTypeKeyName' : 'IS_PRIVATE_NETWORK_ONLY' }, {'attributeTypeKeyName' : 'NON_LACP' }],
573- 'prices' :[{'id' :3 , 'locationGroupId' : 55 , 'recurringFee' :99 }]
574- },
575- {'itemCategory' : {'categoryCode' :'port_speed' },
576- 'capacity' :100 ,
577- 'attributes' :[{'attributeTypeKeyName' : 'IS_PRIVATE_NETWORK_ONLY' }],
578- 'prices' :[{'id' :4 , 'locationGroupId' : 12 , 'recurringFee' :99 }]
579- },
580- {'itemCategory' : {'categoryCode' :'port_speed' },
581- 'capacity' :100 ,
582- 'attributes' :[{'attributeTypeKeyName' : 'IS_PRIVATE_NETWORK_ONLY' }],
583- 'prices' :[{'id' :5 , 'locationGroupId' : None , 'recurringFee' :99 }]
584- },
562+ {'itemCategory' : {'categoryCode' : 'port_speed' },
563+ 'capacity' : 101 ,
564+ 'attributes' : [{'attributeTypeKeyName' : 'IS_PRIVATE_NETWORK_ONLY' }],
565+ 'prices' : [{'id' : 1 , 'locationGroupId' : None , 'recurringFee' : 99 }]
566+ },
567+ {'itemCategory' : {'categoryCode' : 'port_speed' },
568+ 'capacity' : 100 ,
569+ 'attributes' : [{'attributeTypeKeyName' : 'IS_NOT_PRIVATE_NETWORK_ONLY' }],
570+ 'prices' : [{'id' : 2 , 'locationGroupId' : 55 , 'recurringFee' : 99 }]
571+ },
572+ {'itemCategory' : {'categoryCode' : 'port_speed' },
573+ 'capacity' : 100 ,
574+ 'attributes' : [{'attributeTypeKeyName' : 'IS_PRIVATE_NETWORK_ONLY' }, {'attributeTypeKeyName' : 'NON_LACP' }],
575+ 'prices' : [{'id' : 3 , 'locationGroupId' : 55 , 'recurringFee' : 99 }]
576+ },
577+ {'itemCategory' : {'categoryCode' : 'port_speed' },
578+ 'capacity' : 100 ,
579+ 'attributes' : [{'attributeTypeKeyName' : 'IS_PRIVATE_NETWORK_ONLY' }],
580+ 'prices' : [{'id' : 4 , 'locationGroupId' : 12 , 'recurringFee' : 99 }]
581+ },
582+ {'itemCategory' : {'categoryCode' : 'port_speed' },
583+ 'capacity' : 100 ,
584+ 'attributes' : [{'attributeTypeKeyName' : 'IS_PRIVATE_NETWORK_ONLY' }],
585+ 'prices' : [{'id' : 5 , 'locationGroupId' : None , 'recurringFee' : 99 }]
586+ },
585587 ]
586588 location = {
587589 'location' : {
@@ -594,10 +596,10 @@ def test_get_port_speed_price_id_mismatch(self):
594596 }
595597 }
596598 result = managers .hardware ._get_port_speed_price_id (items , 100 , True , location )
597- self .assertEqual (5 , result )
599+ self .assertEqual (5 , result )
598600
599601 def test_matches_location (self ):
600- price = {'id' :1 , 'locationGroupId' : 51 , 'recurringFee' :99 }
602+ price = {'id' : 1 , 'locationGroupId' : 51 , 'recurringFee' : 99 }
601603 location = {
602604 'location' : {
603605 'location' : {
@@ -609,5 +611,4 @@ def test_matches_location(self):
609611 }
610612 }
611613 result = managers .hardware ._matches_location (price , location )
612- self .assertTrue (result )
613-
614+ self .assertTrue (result )
0 commit comments