File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1010
1111from unittest import mock as mock
1212
13+ from SoftLayer .fixtures import SoftLayer_User_Customer
1314from SoftLayer import testing
1415
1516
@@ -398,6 +399,12 @@ def test_api_key_with_all_option(self):
398399 self .assertEqual (2 , result .exit_code )
399400 self .assertIn ('Can only specify one option' , result .exception .message )
400401
402+ def test_remove_api_authentication_key_without_api_key (self ):
403+ mock = self .set_mock ('SoftLayer_User_Customer' , 'getApiAuthenticationKeys' )
404+ mock .return_value = SoftLayer_User_Customer .getEmptyApiAuthenticationKeys
405+ result = self .run_command (['user' , 'apikey' , '123456' , '--remove' ])
406+ self .assert_no_fail (result )
407+
401408 def test_add_api_authentication_key (self ):
402409 result = self .run_command (['user' , 'apikey' , '123456' , '--add' ])
403410 self .assert_no_fail (result )
You can’t perform that action at this time.
0 commit comments