Skip to content

Commit d4e3866

Browse files
committed
Added create subnet static ipv6 test
1 parent 1b496b2 commit d4e3866

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/CLI/modules/subnet_tests.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,23 @@ def test_create_subnet_static(self, confirm_mock):
114114
]
115115

116116
self.assertEqual(output, json.loads(result.output))
117+
118+
@mock.patch('SoftLayer.CLI.formatting.confirm')
119+
def test_create_subnet_static_ipv6(self, confirm_mock):
120+
confirm_mock.return_value = True
121+
122+
item_mock = self.set_mock('SoftLayer_Product_Package', 'getItems')
123+
item_mock.return_value = SoftLayer_Product_Package.getItems
124+
125+
place_mock = self.set_mock('SoftLayer_Product_Order', 'verifyOrder')
126+
place_mock.return_value = SoftLayer_Product_Order.verifyOrder
127+
128+
result = self.run_command(['subnet', 'create', '--v6', 'static', '64', '12346', '--test'])
129+
self.assert_no_fail(result)
130+
131+
output = [
132+
{'Item': 'this is a thing', 'cost': '2.00'},
133+
{'Item': 'Total monthly cost', 'cost': '2.00'}
134+
]
135+
136+
self.assertEqual(output, json.loads(result.output))

0 commit comments

Comments
 (0)