diff --git a/src/borg/testsuite/legacyrepository_test.py b/src/borg/testsuite/legacyrepository_test.py index c575e1e5e..ca431b2b1 100644 --- a/src/borg/testsuite/legacyrepository_test.py +++ b/src/borg/testsuite/legacyrepository_test.py @@ -976,7 +976,7 @@ def test_remote_rpc_exception_transport(remote_repository): remote_repository.call("inject_exception", {"kind": "divide"}) except LegacyRemoteRepository.RPCError as e: assert e.unpacked - assert e.get_message() == "ZeroDivisionError: integer division or modulo by zero\n" + assert e.get_message().startswith("ZeroDivisionError:") assert e.exception_class == "ZeroDivisionError" assert len(e.exception_full) > 0 diff --git a/src/borg/testsuite/repository_test.py b/src/borg/testsuite/repository_test.py index aaee455e5..7e2e14085 100644 --- a/src/borg/testsuite/repository_test.py +++ b/src/borg/testsuite/repository_test.py @@ -224,7 +224,7 @@ def test_remote_rpc_exception_transport(remote_repository): remote_repository.call("inject_exception", {"kind": "divide"}) except RemoteRepository.RPCError as e: assert e.unpacked - assert e.get_message() == "ZeroDivisionError: integer division or modulo by zero\n" + assert e.get_message().startswith("ZeroDivisionError:") assert e.exception_class == "ZeroDivisionError" assert len(e.exception_full) > 0