diff --git a/tox.ini b/tox.ini index 57c2f4e..031ca65 100644 --- a/tox.ini +++ b/tox.ini @@ -56,6 +56,13 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt +[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}/requirements.txt + -r{toxinidir}/test-requirements.txt + [testenv:py3] basepython = python3 deps = @@ -65,7 +72,7 @@ deps = [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} hooks unit_tests tests actions lib files charm-proof diff --git a/unit_tests/test_actions.py b/unit_tests/test_actions.py index ab924ef..e6053ae 100644 --- a/unit_tests/test_actions.py +++ b/unit_tests/test_actions.py @@ -92,7 +92,7 @@ class PauseTestCase(CharmTestCase): return True self.service_pause.side_effect = maybe_kill - self.assertRaisesRegexp( + self.assertRaisesRegex( Exception, "haproxy didn't stop cleanly.", actions.actions.pause, self.args) self.assertEqual(pause_calls, ["swift-proxy"]) @@ -146,7 +146,7 @@ class ResumeTestCase(CharmTestCase): return True self.service_resume.side_effect = maybe_kill - self.assertRaisesRegexp( + self.assertRaisesRegex( Exception, "apache2 didn't start cleanly.", actions.actions.resume, self.args) self.assertEqual(resume_calls, ['swift-proxy', 'memcached']) @@ -294,7 +294,7 @@ class DiskUsageTestCase(CharmTestCase): self.check_output.assert_called_once_with(['swift-recon', '-d']) self.action_set.assert_called() - self.action_fail.not_called() + self.action_fail.assert_not_called() def test_check_output_failure(self): """Ensure that action_fail and action_set are called on