diff --git a/neo4j/v1/session.py b/neo4j/v1/session.py index a5af08d5d..39244555c 100644 --- a/neo4j/v1/session.py +++ b/neo4j/v1/session.py @@ -333,7 +333,7 @@ def __init__(self, statement, parameters, **metadata): if position is not None: position = Position(position["offset"], position["line"], position["column"]) self.notifications.append(Notification(notification["code"], notification["title"], - notification["description"], position)) + notification["description"], notification["severity"], position)) class Counters(object): @@ -416,9 +416,11 @@ def __repr__(self): #: a short summary of the notification #: description: #: a long description of the notification +#: severity: +#: the severity level of the notification #: position: #: the position in the statement where this notification points to, if relevant. -Notification = namedtuple("Notification", ("code", "title", "description", "position")) +Notification = namedtuple("Notification", ("code", "title", "description", "severity", "position")) #: A position within a statement, consisting of offset, line and column. #: diff --git a/test/test_session.py b/test/test_session.py index bd95ce4e6..5cce8acbc 100644 --- a/test/test_session.py +++ b/test/test_session.py @@ -337,6 +337,7 @@ def test_can_obtain_notification_info(self): assert notification.code == "Neo.ClientNotification.Statement.CartesianProduct" assert notification.title == "This query builds a cartesian product between " \ "disconnected patterns." + assert notification.severity == "WARNING" assert notification.description == "If a part of a query contains multiple " \ "disconnected patterns, this will build a " \ "cartesian product between all those parts. This " \