Skip to content

Commit 6df4ccb

Browse files
Ramkishor ChaladiRamkishor Chaladi
authored andcommitted
added force flag
1 parent c048566 commit 6df4ccb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/CLI/modules/server_tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,7 @@ def test_create_hw_no_confirm(self, confirm_mock):
922922
'--network=TEST_NETWORK', '--os=UBUNTU_12_64'])
923923

924924
self.assertEqual(result.exit_code, 2)
925+
self.assertEqual('Aborting dedicated server order.', result.exception.message)
925926

926927
@mock.patch('SoftLayer.CLI.formatting.confirm')
927928
def test_authorize_hw_no_confirm(self, confirm_mock):

tests/managers/hardware_tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,3 +1052,11 @@ def test_is_private(self):
10521052
item_public = {'attributes': [{'attributeTypeKeyName': 'NOT_PRIVATE_NETWORK_ONLY'}]}
10531053
self.assertTrue(managers.hardware._is_private_port_speed_item(item_private))
10541054
self.assertFalse(managers.hardware._is_private_port_speed_item(item_public))
1055+
1056+
@mock.patch('SoftLayer.CLI.formatting.confirm')
1057+
def test_hardware_cancel_no_force(self, confirm_mock):
1058+
confirm_mock.return_value = False
1059+
result = self.run_command(['hardware', 'cancel', '102'])
1060+
1061+
self.assertEqual(2, result.exit_code)
1062+
self.assertEqual('Aborted', result.exception.message)

0 commit comments

Comments
 (0)