@@ -731,7 +731,7 @@ def test_get_item_capacity_core(self):
731731 "capacity" : "1" ,
732732 "id" : 10201 ,
733733 "keyName" : "GUEST_CORE_1_DEDICATED" ,
734- }]
734+ }]
735735
736736 item_capacity = self .ordering .get_item_capacity (items , ['GUEST_CORE_1_DEDICATED' , 'OS_RHEL_7_X_LAMP_64_BIT' ])
737737
@@ -748,7 +748,7 @@ def test_get_item_capacity_storage(self):
748748 "capacity" : "1" ,
749749 "id" : 10201 ,
750750 "keyName" : "READHEAVY_TIER" ,
751- }]
751+ }]
752752
753753 item_capacity = self .ordering .get_item_capacity (items , ['READHEAVY_TIER' , 'STORAGE_SPACE_FOR_2_IOPS_PER_GB' ])
754754
@@ -766,7 +766,7 @@ def test_get_item_capacity_intel(self):
766766 "capacity" : "1" ,
767767 "id" : 10201 ,
768768 "keyName" : "GUEST_CORE_1_DEDICATED" ,
769- }]
769+ }]
770770
771771 item_capacity = self .ordering .get_item_capacity (items , ['INTEL_XEON_2690_2_60' , 'BANDWIDTH_20000_GB' ])
772772
@@ -805,3 +805,24 @@ def test_get_item_prices_by_location(self):
805805
806806 self .assertEqual (options [0 ]['item' ]['keyName' ], item_prices [0 ]['item' ]['keyName' ])
807807 self .assertEqual (options [0 ]['hourlyRecurringFee' ], item_prices [0 ]['hourlyRecurringFee' ])
808+
809+ def test_get_oder_detail_mask (self ):
810+ order_id = 12345
811+ test_mask = 'mask[id]'
812+ self .ordering .get_order_detail (order_id , mask = test_mask )
813+ self .assert_called_with ('SoftLayer_Billing_Order' , 'getObject' , identifier = order_id , mask = test_mask )
814+
815+ def test_get_oder_detail_default_mask (self ):
816+ order_id = 12345
817+ _default_mask = (
818+ 'mask[orderTotalAmount,orderApprovalDate,'
819+ 'initialInvoice[id,amount,invoiceTotalAmount,'
820+ 'invoiceTopLevelItems[id, description, hostName, domainName, oneTimeAfterTaxAmount,'
821+ 'recurringAfterTaxAmount, createDate,'
822+ 'categoryCode,'
823+ 'category[name],'
824+ 'location[name],'
825+ 'children[id, category[name], description, oneTimeAfterTaxAmount,recurringAfterTaxAmount]]],'
826+ 'items[description],userRecord[displayName,userStatus]]' )
827+ self .ordering .get_order_detail (order_id )
828+ self .assert_called_with ('SoftLayer_Billing_Order' , 'getObject' , identifier = order_id , mask = _default_mask )
0 commit comments