@@ -145,13 +145,8 @@ def test_generate_order_template(self):
145145 extras = {'hardware' : [{'hostname' : 'test1' , 'domain' : 'example.com' }]}
146146
147147 result = self .ordering .generate_order_template (1234 , extras , quantity = 1 )
148- self .assertEqual (result , {'presetId' : '' ,
149- 'hardware' : [{'domain' : 'example.com' ,
150- 'hostname' : 'test1' }],
151- 'useHourlyPricing' : '' ,
152- 'packageId' : 50 ,
153- 'prices' : [{'id' : 1921 }],
154- 'quantity' : 1 })
148+ self .assert_called_with ('SoftLayer_Billing_Order_Quote' , 'getRecalculatedOrderContainer' )
149+ self .assertEqual (result ['hardware' ][0 ]['domain' ], 'example.com' )
155150
156151 def test_generate_order_template_virtual (self ):
157152 extras = {
@@ -162,14 +157,8 @@ def test_generate_order_template_virtual(self):
162157 'testProperty' : 100
163158 }
164159 result = self .ordering .generate_order_template (1234 , extras , quantity = 1 )
165- self .assertEqual (result , {'presetId' : '' ,
166- 'hardware' : [{'domain' : 'example.com' ,
167- 'hostname' : 'test1' }],
168- 'useHourlyPricing' : '' ,
169- 'packageId' : 50 ,
170- 'prices' : [{'id' : 1921 }],
171- 'quantity' : 1 ,
172- 'testProperty' : 100 })
160+ self .assert_called_with ('SoftLayer_Billing_Order_Quote' , 'getRecalculatedOrderContainer' )
161+ self .assertEqual (result ['testProperty' ], 100 )
173162
174163 def test_generate_order_template_extra_quantity (self ):
175164 self .assertRaises (ValueError ,
@@ -666,3 +655,23 @@ def test_issues1067(self):
666655 package = 'DUAL_INTEL_XEON_PROCESSOR_SCALABLE_FAMILY_4_DRIVES'
667656 result = self .ordering .get_price_id_list (package , item_keynames , None )
668657 self .assertIn (201161 , result )
658+
659+
660+ def test_clean_quote_verify (self ):
661+ from pprint import pprint as pp
662+ extras = {
663+ 'hardware' : [{
664+ 'hostname' : 'test1' ,
665+ 'domain' : 'example.com'
666+ }],
667+ 'testProperty' : ''
668+ }
669+ result = self .ordering .verify_quote (1234 , extras )
670+
671+ self .assertEqual (result , fixtures .SoftLayer_Billing_Order_Quote .verifyOrder )
672+ self .assert_called_with ('SoftLayer_Billing_Order_Quote' , 'verifyOrder' )
673+ call = self .calls ('SoftLayer_Billing_Order_Quote' , 'verifyOrder' )[0 ]
674+ order_container = call .args [0 ]
675+ self .assertNotIn ('testProperty' , order_container )
676+ self .assertNotIn ('reservedCapacityId' , order_container )
677+
0 commit comments