From 7aa6eb2c5899e3c317f7932724c53f06396b2b3e Mon Sep 17 00:00:00 2001 From: allmightyspiff Date: Wed, 24 Apr 2019 14:28:39 -0500 Subject: [PATCH] #1131 made sure config_tests dont actually try to make api calls --- tests/CLI/modules/config_tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/CLI/modules/config_tests.py b/tests/CLI/modules/config_tests.py index 4fe9cf867..ec018a53c 100644 --- a/tests/CLI/modules/config_tests.py +++ b/tests/CLI/modules/config_tests.py @@ -75,10 +75,12 @@ def test_setup(self, mocked_input, getpass, confirm_mock, client): self.assertTrue('api_key = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' in contents) self.assertTrue('endpoint_url = %s' % consts.API_PUBLIC_ENDPOINT in contents) + @mock.patch('SoftLayer.Client') @mock.patch('SoftLayer.CLI.formatting.confirm') @mock.patch('SoftLayer.CLI.environment.Environment.getpass') @mock.patch('SoftLayer.CLI.environment.Environment.input') - def test_setup_cancel(self, mocked_input, getpass, confirm_mock): + def test_setup_cancel(self, mocked_input, getpass, confirm_mock, client): + client.return_value = self.env.client with tempfile.NamedTemporaryFile() as config_file: confirm_mock.return_value = False getpass.return_value = 'A' * 64