Skip to content
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
6 changes: 5 additions & 1 deletion nutkit/protocol/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@ def __init__(self, text, parameters):


class Bookmarks:
"""Represents an array of bookmarks."""
"""
Represents an array of bookmarks.

`bookmarks` is an array of bookmarks (str).
"""

def __init__(self, bookmarks):
self.bookmarks = bookmarks
Expand Down
27 changes: 27 additions & 0 deletions tests/stub/bookmarks/scripts/v3/bookmarks.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
!: BOLT 3

A: HELLO {"{}": "*"}
*: RESET

{{
C: RUN "RETURN 1 AS n" {} {#BM_IN#, "[mode]": "w"}
S: SUCCESS {"fields": ["n"]}
{{
C: PULL_ALL
----
C: DISCARD_ALL
}}
S: SUCCESS {"type": "w", "bookmark": "#BM_OUT#"}
----
C: RUN "RETURN 1 AS n" {} {#BM_IN#, "mode": "r"}
S: SUCCESS {"fields": ["n"]}
{{
C: PULL_ALL
----
C: DISCARD_ALL
}}
S: SUCCESS {"type": "r", "bookmark": "#BM_OUT#"}
}}

*: RESET
?: GOODBYE
33 changes: 33 additions & 0 deletions tests/stub/bookmarks/scripts/v3/bookmarks_tx.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
!: BOLT 3

A: HELLO {"{}": "*"}
*: RESET

{{
C: BEGIN {#BM_IN#, "[mode]": "w"}
S: SUCCESS {}
C: RUN "RETURN 1 AS n" {} {}
S: SUCCESS {"fields": ["n"]}
{{
C: PULL_ALL
----
C: DISCARD_ALL
}}
S: SUCCESS {"type": "w"}
----
C: BEGIN {#BM_IN#, "mode": "r"}
S: SUCCESS {}
C: RUN "RETURN 1 AS n" {} {}
S: SUCCESS {"fields": ["n"]}
{{
C: PULL_ALL
----
C: DISCARD_ALL
}}
S: SUCCESS {"type": "r"}
}}
C: COMMIT
S: SUCCESS {"bookmark": "#BM_OUT#"}

*: RESET
?: GOODBYE

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions tests/stub/bookmarks/scripts/v3/send_bookmark_write_tx.script

This file was deleted.

27 changes: 27 additions & 0 deletions tests/stub/bookmarks/scripts/v4/bookmarks.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
!: BOLT 4.4

A: HELLO {"{}": "*"}
*: RESET

{{
C: RUN "RETURN 1 AS n" {} {#BM_IN#, "[mode]": "w"}
S: SUCCESS {"fields": ["n"]}
{{
C: PULL {"n": {"Z": "*"}, "[qid]": -1}
----
C: DISCARD {"n": {"Z": "*"}, "[qid]": -1}
}}
S: SUCCESS {"type": "w", "bookmark": "#BM_OUT#"}
----
C: RUN "RETURN 1 AS n" {} {#BM_IN#, "mode": "r"}
S: SUCCESS {"fields": ["n"]}
{{
C: PULL {"n": {"Z": "*"}, "[qid]": -1}
----
C: DISCARD {"n": {"Z": "*"}, "[qid]": -1}
}}
S: SUCCESS {"type": "r", "bookmark": "#BM_OUT#"}
}}

*: RESET
?: GOODBYE
33 changes: 33 additions & 0 deletions tests/stub/bookmarks/scripts/v4/bookmarks_tx.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
!: BOLT 4.4

A: HELLO {"{}": "*"}
*: RESET

{{
C: BEGIN {#BM_IN#, "[mode]": "w"}
S: SUCCESS {}
C: RUN "RETURN 1 AS n" {} {}
S: SUCCESS {"fields": ["n"]}
{{
C: PULL {"n": {"Z": "*"}, "[qid]": -1}
----
C: DISCARD {"n": {"Z": "*"}, "[qid]": -1}
}}
S: SUCCESS {"type": "w"}
----
C: BEGIN {#BM_IN#, "mode": "r"}
S: SUCCESS {}
C: RUN "RETURN 1 AS n" {} {}
S: SUCCESS {"fields": ["n"]}
{{
C: PULL {"n": {"Z": "*"}, "[qid]": -1}
----
C: DISCARD {"n": {"Z": "*"}, "[qid]": -1}
}}
S: SUCCESS {"type": "r"}
}}
C: COMMIT
S: SUCCESS {"bookmark": "#BM_OUT#"}

*: RESET
?: GOODBYE

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions tests/stub/bookmarks/scripts/v4/send_bookmark_write_tx.script

This file was deleted.

Loading