Skip to content

Commit 6b8bbbb

Browse files
author
Fernando Ojeda
committed
Fix tox test.
1 parent 3a513c0 commit 6b8bbbb

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

SoftLayer/fixtures/SoftLayer_Product_Package.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,53 @@
11381138
'sort': 0
11391139
}]
11401140

1141+
getItemsVS = [
1142+
{
1143+
'id': 1234,
1144+
'keyName': 'KeyName01',
1145+
'capacity': '1000',
1146+
'description': 'Public & Private Networks',
1147+
'itemCategory': {'categoryCode': 'Uplink Port Speeds'},
1148+
'softwareDescription': {
1149+
'id': 1228,
1150+
'longDescription': 'Redhat EL 5.10-64',
1151+
'referenceCode': 'REDHAT_5_64'
1152+
},
1153+
'prices': [{'id': 1122,
1154+
'hourlyRecurringFee': 0.0,
1155+
'recurringFee': 0.0,
1156+
'categories': [{'id': 26,
1157+
'name': 'Uplink Port Speeds',
1158+
'categoryCode': 'port_speed'}]}],
1159+
},
1160+
{
1161+
'id': 2233,
1162+
'keyName': 'KeyName02',
1163+
'capacity': '1000',
1164+
'description': 'Public & Private Networks',
1165+
'itemCategory': {'categoryCode': 'Uplink Port Speeds'},
1166+
'prices': [{'id': 4477,
1167+
'hourlyRecurringFee': 0.0,
1168+
'recurringFee': 0.0,
1169+
'categories': [{'id': 26,
1170+
'name': 'Uplink Port Speeds',
1171+
'categoryCode': 'port_speed'}]}],
1172+
},
1173+
{
1174+
'id': 1239,
1175+
'keyName': 'KeyName03',
1176+
'capacity': '2',
1177+
'description': 'RAM',
1178+
'itemCategory': {'categoryCode': 'RAM'},
1179+
'prices': [{'id': 1133,
1180+
'hourlyRecurringFee': 0.0,
1181+
'recurringFee': 0.0,
1182+
'categories': [{'id': 3,
1183+
'name': 'RAM',
1184+
'categoryCode': 'ram'}]}],
1185+
}
1186+
]
1187+
11411188
verifyOrderDH = {
11421189
'preTaxSetup': '0',
11431190
'storageGroups': [],

tests/CLI/modules/vs/vs_create_tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,9 @@ def test_create_with_ipv6_no_prices(self, confirm_mock):
639639
Since its hard to test if the price ids gets added to placeOrder call,
640640
this test juse makes sure that code block isn't being skipped
641641
"""
642+
confirm_mock.return_value = True
643+
amock = self.set_mock('SoftLayer_Product_Package', 'getItems')
644+
amock.return_value = SoftLayer_Product_Package.getItemsVS
642645
result = self.run_command(['vs', 'create', '--test', '--hostname', 'TEST',
643646
'--domain', 'TESTING', '--flavor', 'B1_2X8X25',
644647
'--datacenter', 'TEST00', '--os', 'UBUNTU_LATEST',

0 commit comments

Comments
 (0)