forked from pool/python-softlayer
- added patches fix https://github.com/softlayer/softlayer-python/issues/1095 + python-softlayer-fix-teset_setup_cancel.patch OBS-URL: https://build.opensuse.org/request/show/697734 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-softlayer?expand=0&rev=7
20 lines
1.0 KiB
Diff
20 lines
1.0 KiB
Diff
diff --git a/tests/CLI/modules/config_tests.py b/tests/CLI/modules/config_tests.py
|
|
index 4fe9cf86..ec018a53 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
|
|
|