diff --git a/pytest_tests/tests/session_token/test_static_object_session_token.py b/pytest_tests/tests/session_token/test_static_object_session_token.py index 597eab9c5..b31aff15d 100644 --- a/pytest_tests/tests/session_token/test_static_object_session_token.py +++ b/pytest_tests/tests/session_token/test_static_object_session_token.py @@ -380,7 +380,7 @@ def test_static_session_signed_by_other( temp_directory, ) signed_token_file = sign_session_token(self.shell, session_token_file, stranger_wallet) - with pytest.raises(Exception, match=MALFORMED_REQUEST): + with pytest.raises(Exception, match=OBJECT_ACCESS_DENIED): head_object( user_wallet.path, storage_object.cid, @@ -670,7 +670,7 @@ def test_static_session_put_verb( f"Put verb should be restricted for static session for {request.node.callspec.id}" ) storage_object = storage_objects[0] - with pytest.raises(Exception, match=MALFORMED_REQUEST): + with pytest.raises(Exception, match=OBJECT_ACCESS_DENIED): put_object_to_random_node( user_wallet.path, storage_object.file_path,