Skip to content

Commit b3d28a2

Browse files
committed
#1555 update hw billing test
1 parent 564e241 commit b3d28a2

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

SoftLayer/fixtures/SoftLayer_Hardware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
'id': 6327,
88
'recurringFee': 1.54,
99
'nextInvoiceTotalRecurringAmount': 16.08,
10-
'nextInvoiceChildren': [
10+
'children': [
1111
{'description': 'test', 'nextInvoiceTotalRecurringAmount': 1},
1212
],
1313
'orderItem': {

tests/CLI/modules/server_tests.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -868,19 +868,25 @@ def test_hardware_storage(self):
868868

869869
def test_billing(self):
870870
result = self.run_command(['hw', 'billing', '123456'])
871-
billing_json = {
871+
hardware_server_billing = {
872872
'Billing Item Id': 6327,
873873
'Id': '123456',
874874
'Provision Date': None,
875875
'Recurring Fee': 1.54,
876876
'Total': 16.08,
877-
'prices': [{
878-
'Item': 'test',
879-
'Recurring Price': 1
880-
}]
877+
'prices': [
878+
{
879+
'Item': 'test',
880+
'Recurring Price': 1
881+
},
882+
{
883+
'Item': 'test2',
884+
'Recurring Price': 2
885+
},
886+
]
881887
}
882888
self.assert_no_fail(result)
883-
self.assertEqual(json.loads(result.output), billing_json)
889+
self.assertEqual(json.loads(result.output), hardware_server_billing)
884890

885891
@mock.patch('SoftLayer.CLI.formatting.confirm')
886892
def test_create_hw_no_confirm(self, confirm_mock):

0 commit comments

Comments
 (0)