forked from pool/python-softlayer
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:
committed by
Git OBS Bridge
parent
723b25fcd3
commit
51a40222b1
19
python-softlayer-fix-teset_setup_cancel.patch
Normal file
19
python-softlayer-fix-teset_setup_cancel.patch
Normal 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
|
||||||
|
|
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 25 06:27:39 UTC 2019 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/softlayer/softlayer-python/issues/1095
|
||||||
|
+ python-softlayer-fix-teset_setup_cancel.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 9 13:07:50 UTC 2019 - pgajdos@suse.com
|
Tue Apr 9 13:07:50 UTC 2019 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -25,6 +25,8 @@ License: MIT
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/softlayer/softlayer-python
|
URL: https://github.com/softlayer/softlayer-python
|
||||||
Source: https://github.com/softlayer/softlayer-python/archive/v%{version}.tar.gz
|
Source: https://github.com/softlayer/softlayer-python/archive/v%{version}.tar.gz
|
||||||
|
# fix https://github.com/softlayer/softlayer-python/issues/1095
|
||||||
|
Patch0: python-softlayer-fix-teset_setup_cancel.patch
|
||||||
BuildRequires: %{python_module PrettyTable >= 0.7.0}
|
BuildRequires: %{python_module PrettyTable >= 0.7.0}
|
||||||
BuildRequires: %{python_module click}
|
BuildRequires: %{python_module click}
|
||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
@@ -53,6 +55,7 @@ This library provides a simple Python client to interact with SoftLayer's XML-RP
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n softlayer-python-%{version}
|
%setup -q -n softlayer-python-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@@ -64,8 +67,7 @@ This library provides a simple Python client to interact with SoftLayer's XML-RP
|
|||||||
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# https://github.com/softlayer/softlayer-python/issues/1095#issuecomment-481233467
|
%pytest
|
||||||
%pytest -k 'not test_setup_cancel'
|
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
Reference in New Issue
Block a user