diff --git a/rhodecode/tests/vcs_operations/test_vcs_operations_bad_client.py b/rhodecode/tests/vcs_operations/test_vcs_operations_bad_client.py --- a/rhodecode/tests/vcs_operations/test_vcs_operations_bad_client.py +++ b/rhodecode/tests/vcs_operations/test_vcs_operations_bad_client.py @@ -21,6 +21,7 @@ Test suite for making push/pull operatio """ import pytest +from importlib.metadata import version from rhodecode.model.meta import Session from rhodecode.model.settings import SettingsModel @@ -65,7 +66,8 @@ class TestVCSOperationsOnUsingBadClient( # push fails repo is locked by other user ! push_url = rcstack.repo_clone_url(HG_REPO) stdout, stderr = _add_files_and_push("hg", tmpdir.strpath, clone_url=push_url) - msg = "Your hg client (version=mercurial/proto-1.0 (Mercurial 6.7.4)) is forbidden by security rules" + current_version = version('mercurial') + msg = f"Your hg client (version=mercurial/proto-1.0 (Mercurial {current_version})) is forbidden by security rules" assert msg in stderr def test_push_with_bad_client_repo_by_other_user_git(self, rcstack, tmpdir):