Skip to content

Commit

Permalink
added force flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramkishor Chaladi authored and Ramkishor Chaladi committed Aug 21, 2023
1 parent c048566 commit 6df4ccb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/CLI/modules/server_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,7 @@ def test_create_hw_no_confirm(self, confirm_mock):
'--network=TEST_NETWORK', '--os=UBUNTU_12_64'])

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

@mock.patch('SoftLayer.CLI.formatting.confirm')
def test_authorize_hw_no_confirm(self, confirm_mock):
Expand Down
8 changes: 8 additions & 0 deletions tests/managers/hardware_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,3 +1052,11 @@ def test_is_private(self):
item_public = {'attributes': [{'attributeTypeKeyName': 'NOT_PRIVATE_NETWORK_ONLY'}]}
self.assertTrue(managers.hardware._is_private_port_speed_item(item_private))
self.assertFalse(managers.hardware._is_private_port_speed_item(item_public))

@mock.patch('SoftLayer.CLI.formatting.confirm')
def test_hardware_cancel_no_force(self, confirm_mock):
confirm_mock.return_value = False
result = self.run_command(['hardware', 'cancel', '102'])

self.assertEqual(2, result.exit_code)
self.assertEqual('Aborted', result.exception.message)

0 comments on commit 6df4ccb

Please sign in to comment.