diff --git a/CHANGELOG.md b/CHANGELOG.md index 1170d27..9e87eb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # New in version UNRELEASED +* Fix tests for Python 3.12 + New in version 0.1.7 * Allow ranges of decimal digits in some fields, to match specifications more diff --git a/tests/test_p7m.py b/tests/test_p7m.py index 32af140..ce4e031 100644 --- a/tests/test_p7m.py +++ b/tests/test_p7m.py @@ -103,7 +103,7 @@ def test_verify_corrupted_payload(self): encap_content_info["content"] = b"All your base are belong to us" p7m.data = p7m.content_info.dump() with self.capath() as capath: - with self.assertRaisesRegexp(InvalidSignatureError, r"routines:CMS_verify:content verify error"): + with self.assertRaisesRegex(InvalidSignatureError, r"routines:CMS_verify:content verify error"): p7m.verify_signature(capath) def test_verify_noca(self): @@ -111,6 +111,6 @@ def test_verify_noca(self): if p7m.is_expired(): self.skipTest("test signature has expired and needs to be regenerated") with tempfile.TemporaryDirectory() as capath: - with self.assertRaisesRegexp( + with self.assertRaisesRegex( InvalidSignatureError, r"Verify error:\s*unable to get local issuer certificate"): p7m.verify_signature(capath)