Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regex asserts #514

Merged
merged 2 commits into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/1.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Replace deprecated assert methods.
[gforcada]
4 changes: 2 additions & 2 deletions src/plone/api/tests/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down