@@ -731,7 +731,7 @@ def test_get_item_capacity_core(self):
731
731
"capacity" : "1" ,
732
732
"id" : 10201 ,
733
733
"keyName" : "GUEST_CORE_1_DEDICATED" ,
734
- }]
734
+ }]
735
735
736
736
item_capacity = self .ordering .get_item_capacity (items , ['GUEST_CORE_1_DEDICATED' , 'OS_RHEL_7_X_LAMP_64_BIT' ])
737
737
@@ -748,7 +748,7 @@ def test_get_item_capacity_storage(self):
748
748
"capacity" : "1" ,
749
749
"id" : 10201 ,
750
750
"keyName" : "READHEAVY_TIER" ,
751
- }]
751
+ }]
752
752
753
753
item_capacity = self .ordering .get_item_capacity (items , ['READHEAVY_TIER' , 'STORAGE_SPACE_FOR_2_IOPS_PER_GB' ])
754
754
@@ -766,7 +766,7 @@ def test_get_item_capacity_intel(self):
766
766
"capacity" : "1" ,
767
767
"id" : 10201 ,
768
768
"keyName" : "GUEST_CORE_1_DEDICATED" ,
769
- }]
769
+ }]
770
770
771
771
item_capacity = self .ordering .get_item_capacity (items , ['INTEL_XEON_2690_2_60' , 'BANDWIDTH_20000_GB' ])
772
772
@@ -805,3 +805,24 @@ def test_get_item_prices_by_location(self):
805
805
806
806
self .assertEqual (options [0 ]['item' ]['keyName' ], item_prices [0 ]['item' ]['keyName' ])
807
807
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