diff --git a/requirements.txt b/requirements.txt index b3dc23f..55c027b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,10 +3,6 @@ # choices of *requirements.txt files for OpenStack Charms: # https://github.com/openstack-charmers/release-tools # -# NOTE(lourot): This might look like a duplication of test-requirements.txt but -# some tox targets use only test-requirements.txt whereas charm-build uses only -# requirements.txt -setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 # NOTE: newer versions of cryptography require a Rust compiler to build, # see diff --git a/test-requirements.txt b/test-requirements.txt index a7936e6..3fd5feb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,6 @@ # https://github.com/openstack-charmers/release-tools # pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here. -setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 stestr>=2.2.0 diff --git a/tox.ini b/tox.ini index 3e44bd9..c2178fb 100644 --- a/tox.ini +++ b/tox.ini @@ -73,9 +73,16 @@ deps = -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} +[testenv:py312] +basepython = python3.12 +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -r{toxinidir}/test-requirements.txt +commands = stestr run --slowest {posargs} + [testenv:pep8] basepython = python3 -deps = flake8==3.9.2 +deps = flake8==7.1.1 git+https://github.com/juju/charm-tools.git commands = flake8 {posargs} src unit_tests diff --git a/unit_tests/test_barbican_vault_handlers.py b/unit_tests/test_barbican_vault_handlers.py index 2bd19c0..9e845aa 100644 --- a/unit_tests/test_barbican_vault_handlers.py +++ b/unit_tests/test_barbican_vault_handlers.py @@ -85,9 +85,9 @@ class TestBarbicanVaultHandlers(test_utils.PatchHelper): endpoint_from_flag.all_unit_tokens = ['token1'] endpoint_from_flag.vault_url = 'https://foo.fl:8200' retrieve_secret_id.return_value = 'big-secret' - self.assertEquals(handlers.get_secret_id(endpoint_from_flag, - 'old-secret'), - 'big-secret') + self.assertEqual(handlers.get_secret_id(endpoint_from_flag, + 'old-secret'), + 'big-secret') @mock.patch.object(handlers.vault_utils, 'retrieve_secret_id') @mock.patch.object(handlers.reactive, 'endpoint_from_flag') @@ -100,9 +100,9 @@ class TestBarbicanVaultHandlers(test_utils.PatchHelper): raise self.fake_hvac.exceptions.InvalidRequest retrieve_secret_id.side_effect = fail - self.assertEquals(handlers.get_secret_id(endpoint_from_flag, - 'old-secret'), - 'old-secret') + self.assertEqual(handlers.get_secret_id(endpoint_from_flag, + 'old-secret'), + 'old-secret') def test_plugin_info_barbican_publish(self): barbican_vault_charm = self.patch_charm()