diff --git a/.zuul.yaml b/.zuul.yaml index 2f201160..4ecc22f5 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,7 +2,7 @@ templates: - openstack-cover-jobs - build-openstack-docs-pti - - openstack-python3-ussuri-jobs + - openstack-python3-zed-jobs - build-release-notes-jobs-python3 post: jobs: diff --git a/cloudbaseinit/tests/test_version.py b/cloudbaseinit/tests/test_version.py index d56c1ed6..4108f1e6 100644 --- a/cloudbaseinit/tests/test_version.py +++ b/cloudbaseinit/tests/test_version.py @@ -78,8 +78,9 @@ class TestVersion(unittest.TestCase): thread = mock_thread.return_value thread.start.assert_called_once_with() + @mock.patch('cloudbaseinit.version.get_version') @mock.patch('cloudbaseinit.version._read_url') - def test__check_latest_version(self, mock_read_url): + def test__check_latest_version(self, mock_read_url, mock_ver): mock_read_url.return_value = {'new_version': 42} mock_callback = mock.Mock() @@ -87,8 +88,9 @@ class TestVersion(unittest.TestCase): mock_callback.assert_called_once_with(42) + @mock.patch('cloudbaseinit.version.get_version') @mock.patch('cloudbaseinit.version._read_url') - def test__check_latest_version_fails(self, mock_read_url): + def test__check_latest_version_fails(self, mock_read_url, mock_ver): mock_read_url.side_effect = Exception('no worky') mock_callback = mock.Mock() @@ -99,8 +101,9 @@ class TestVersion(unittest.TestCase): self.assertEqual(expected_logging, snatcher.output) self.assertFalse(mock_callback.called) + @mock.patch('cloudbaseinit.version.get_version') @mock.patch('cloudbaseinit.version._read_url') - def test__check_latest_version_no_content(self, mock_read_url): + def test__check_latest_version_no_content(self, mock_read_url, mock_ver): mock_read_url.return_value = None mock_callback = mock.Mock() @@ -108,8 +111,10 @@ class TestVersion(unittest.TestCase): self.assertFalse(mock_callback.called) + @mock.patch('cloudbaseinit.version.get_version') @mock.patch('cloudbaseinit.version._read_url') - def test__check_latest_version_no_new_version(self, mock_read_url): + def test__check_latest_version_no_new_version( + self, mock_read_url, mock_ver): mock_read_url.return_value = {'new_versio': 42} mock_callback = mock.Mock() diff --git a/cloudbaseinit/tests/utils/test_crypt.py b/cloudbaseinit/tests/utils/test_crypt.py index 565f4aeb..4abfaaa9 100644 --- a/cloudbaseinit/tests/utils/test_crypt.py +++ b/cloudbaseinit/tests/utils/test_crypt.py @@ -23,9 +23,10 @@ class TestOpenSSLException(unittest.TestCase): self._openssl = crypt.OpenSSLException() def test_get_openssl_error_msg(self): - expected_error_msg = u'error:00000000:lib(0):func(0):reason(0)' - error_msg = self._openssl._get_openssl_error_msg() - self.assertEqual(expected_error_msg, error_msg) + expected_err_msg = u'error:00000000:lib(0):func(0):reason(0)' + expected_err_msg_py10 = u'error:00000000:lib(0)::reason(0)' + err_msg = self._openssl._get_openssl_error_msg() + self.assertIn(err_msg, [expected_err_msg, expected_err_msg_py10]) class TestCryptManager(unittest.TestCase): diff --git a/doc/source/conf.py b/doc/source/conf.py index 0e64a443..e93664e4 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -73,7 +73,7 @@ release = version # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff --git a/setup.cfg b/setup.cfg index 33186b91..55f6d7a8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,9 +15,9 @@ classifier = Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 [files] packages =