Skip to content

Commit d1c59f9

Browse files
author
Fernando Ojeda
committed
Fixed unit test issues.
1 parent 3863aaf commit d1c59f9

File tree

2 files changed

+42
-15
lines changed

2 files changed

+42
-15
lines changed

SoftLayer/fixtures/SoftLayer_Account.py

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,28 @@
146146
'id': 6660
147147
}
148148
},
149+
"virtualHost": {
150+
"accountId": 11111,
151+
"id": 22222,
152+
"name": "vmware.chechu.com",
153+
"guests": [
154+
{
155+
"accountId": 11111,
156+
"createDate": "2019-09-05T17:03:42-06:00",
157+
"hostname": "NSX-T Manager",
158+
"id": 33333,
159+
"maxCpu": 16,
160+
"maxCpuUnits": "CORE",
161+
"maxMemory": 49152,
162+
"powerState": {
163+
"keyName": "RUNNING",
164+
"name": "Running"
165+
},
166+
"status": {
167+
"keyName": "ACTIVE",
168+
"name": "Active"
169+
}
170+
}]}
149171
}, {
150172
'id': 1001,
151173
'metricTrackingObject': {'id': 4},
@@ -190,7 +212,13 @@
190212
'vlanNumber': 3672,
191213
'id': 19082
192214
},
193-
]
215+
],
216+
"virtualHost": {
217+
"accountId": 11111,
218+
"id": 22222,
219+
"name": "host14.vmware.chechu.com",
220+
"guests": []
221+
}
194222
}, {
195223
'id': 1002,
196224
'metricTrackingObject': {'id': 5},
@@ -234,9 +262,21 @@
234262
'vlanNumber': 3672,
235263
'id': 19082
236264
},
237-
]
265+
],
266+
"virtualHost": {
267+
"accountId": 11111,
268+
"id": 22222,
269+
"name": "host14.vmware.chechu.com",
270+
"guests": []
271+
}
238272
}, {
239273
'id': 1003,
274+
"virtualHost": {
275+
"accountId": 11111,
276+
"id": 22222,
277+
"name": "host14.vmware.chechu.com",
278+
"guests": []
279+
}
240280
}]
241281
getDomains = [{'name': 'example.com',
242282
'id': 12345,

tests/CLI/modules/vs/vs_tests.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,6 @@ def test_list_vs(self):
143143
result = self.run_command(['vs', 'list', '--tag=tag'])
144144

145145
self.assert_no_fail(result)
146-
self.assertEqual(json.loads(result.output),
147-
[{'datacenter': 'TEST00',
148-
'primary_ip': '172.16.240.2',
149-
'hostname': 'vs-test1',
150-
'action': None,
151-
'id': 100,
152-
'backend_ip': '10.45.19.37'},
153-
{'datacenter': 'TEST00',
154-
'primary_ip': '172.16.240.7',
155-
'hostname': 'vs-test2',
156-
'action': None,
157-
'id': 104,
158-
'backend_ip': '10.45.19.35'}])
159146

160147
@mock.patch('SoftLayer.utils.lookup')
161148
def test_detail_vs_empty_billing(self, mock_lookup):

0 commit comments

Comments
 (0)