Skip to content

Commit 9f181be

Browse files
Merge pull request #1138 from allmightyspiff/issues1131
#1131 made sure config_tests dont actually try to make api calls
2 parents 606ec64 + 7aa6eb2 commit 9f181be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/CLI/modules/config_tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ def test_setup(self, mocked_input, getpass, confirm_mock, client):
7575
self.assertTrue('api_key = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' in contents)
7676
self.assertTrue('endpoint_url = %s' % consts.API_PUBLIC_ENDPOINT in contents)
7777

78+
@mock.patch('SoftLayer.Client')
7879
@mock.patch('SoftLayer.CLI.formatting.confirm')
7980
@mock.patch('SoftLayer.CLI.environment.Environment.getpass')
8081
@mock.patch('SoftLayer.CLI.environment.Environment.input')
81-
def test_setup_cancel(self, mocked_input, getpass, confirm_mock):
82+
def test_setup_cancel(self, mocked_input, getpass, confirm_mock, client):
83+
client.return_value = self.env.client
8284
with tempfile.NamedTemporaryFile() as config_file:
8385
confirm_mock.return_value = False
8486
getpass.return_value = 'A' * 64

0 commit comments

Comments
 (0)