Hello community, here is the log from the commit of package python-softlayer for openSUSE:Factory checked in at 2019-04-30 13:04:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-softlayer (Old) and /work/SRC/openSUSE:Factory/.python-softlayer.new.5536 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-softlayer" Tue Apr 30 13:04:03 2019 rev:4 rq:697765 version:5.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-softlayer/python-softlayer.changes 2019-04-14 12:22:02.855734170 +0200 +++ /work/SRC/openSUSE:Factory/.python-softlayer.new.5536/python-softlayer.changes 2019-04-30 13:04:08.830045749 +0200 @@ -1,0 +2,7 @@ +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 + +------------------------------------------------------------------- New: ---- python-softlayer-fix-teset_setup_cancel.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-softlayer.spec ++++++ --- /var/tmp/diff_new_pack.pcNw77/_old 2019-04-30 13:04:11.210041654 +0200 +++ /var/tmp/diff_new_pack.pcNw77/_new 2019-04-30 13:04:11.214041646 +0200 @@ -25,6 +25,8 @@ Group: Development/Languages/Python URL: https://github.com/softlayer/softlayer-python 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 click} BuildRequires: %{python_module mock} @@ -53,6 +55,7 @@ %prep %setup -q -n softlayer-python-%{version} +%patch0 -p1 %build %python_build @@ -64,8 +67,7 @@ %python_expand %fdupes -s %{buildroot}%{$python_sitelib} %check -# https://github.com/softlayer/softlayer-python/issues/1095#issuecomment-48123... -%pytest -k 'not test_setup_cancel' +%pytest %files %{python_files} %license LICENSE ++++++ python-softlayer-fix-teset_setup_cancel.patch ++++++ 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