14
0

Accepting request 697734 from home:pgajdos

- 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
This commit is contained in:
Tomáš Chvátal
2019-04-25 07:39:20 +00:00
committed by Git OBS Bridge
parent 723b25fcd3
commit 51a40222b1
3 changed files with 30 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
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