From 3ea0c864e34c9024b5de3d534db7ea0d0f9f9928 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Thu, 5 Oct 2023 14:25:56 +0200 Subject: [PATCH 1/2] fix(py3.12): deprecated methods --- src/plone/api/tests/test_env.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plone/api/tests/test_env.py b/src/plone/api/tests/test_env.py index f18037ce..3086a4d4 100644 --- a/src/plone/api/tests/test_env.py +++ b/src/plone/api/tests/test_env.py @@ -514,14 +514,14 @@ def test_plone_version(self): from plone.api.env import plone_version self.assertTrue(isinstance(plone_version(), str)) - self.assertRegexpMatches(plone_version(), version_regexp) + self.assertRegex(plone_version(), version_regexp) def test_zope_version(self): """Tests that zope_version() returns Zope version.""" from plone.api.env import zope_version self.assertTrue(isinstance(zope_version(), str)) - self.assertRegexpMatches(zope_version(), version_regexp) + self.assertRegex(zope_version(), version_regexp) def test_adopt_user_different_username(self): user = api.user.get(userid=TEST_USER_ID) From b26d6e76664299d1a9f2fe5eb58ba8246f5e5b25 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Thu, 5 Oct 2023 14:26:33 +0200 Subject: [PATCH 2/2] Add news entry --- news/1.bugfix | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 news/1.bugfix diff --git a/news/1.bugfix b/news/1.bugfix new file mode 100644 index 00000000..1494e057 --- /dev/null +++ b/news/1.bugfix @@ -0,0 +1,2 @@ +Replace deprecated assert methods. +[gforcada]