Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bachya committed Aug 4, 2022
1 parent 40dc880 commit 0c7688f
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions tests/test_bookmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,23 @@
["bookmarks", "create", "https://example.com"],
"aiolinkding.bookmark.BookmarkManager.async_create",
["https://example.com"],
{"archived": False, "unread": False},
{"archived": False, "unread": False, "shared": False},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
),
(
["bookmarks", "create", "https://example.com", "-a"],
["bookmarks", "create", "https://example.com", "-a", "--shared"],
"aiolinkding.bookmark.BookmarkManager.async_create",
["https://example.com"],
{"archived": True, "unread": False, "shared": False},
{"archived": True, "unread": False, "shared": True},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
),
(
["bookmarks", "create", "https://example.com", "-t", "Example"],
"aiolinkding.bookmark.BookmarkManager.async_create",
["https://example.com"],
{"archived": False, "title": "Example", "unread": False},
{"archived": False, "title": "Example", "unread": False, "shared": False},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
),
Expand All @@ -136,6 +136,7 @@
"description": "A site description",
"title": "Example",
"unread": False,
"shared": False,
},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
Expand All @@ -160,6 +161,7 @@
"tag_names": ["single-tag"],
"title": "Example",
"unread": False,
"shared": False,
},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
Expand All @@ -184,6 +186,7 @@
"tag_names": ["tag1", "tag2", "tag3"],
"title": "Example",
"unread": False,
"shared": False,
},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
Expand All @@ -192,7 +195,7 @@
["bookmarks", "create", "https://example.com", "--unread"],
"aiolinkding.bookmark.BookmarkManager.async_create",
["https://example.com"],
{"archived": False, "unread": True},
{"archived": False, "unread": True, "shared": False},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
),
Expand Down Expand Up @@ -221,34 +224,38 @@
"Bookmark 12 unarchived.",
),
(
["bookmarks", "update", "12", "-u", "https://example.com"],
["bookmarks", "update", "12", "-u", "https://example.com", "--shared"],
"aiolinkding.bookmark.BookmarkManager.async_update",
[12],
{"url": "https://example.com", "unread": False},
{"url": "https://example.com", "unread": False, "shared": True},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
),
(
["bookmarks", "update", "12", "-t", "Updated Title"],
"aiolinkding.bookmark.BookmarkManager.async_update",
[12],
{"title": "Updated Title", "unread": False},
{"title": "Updated Title", "unread": False, "shared": False},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
),
(
["bookmarks", "update", "12", "--tags", "different-tag1,different-tag2"],
"aiolinkding.bookmark.BookmarkManager.async_update",
[12],
{"tag_names": ["different-tag1", "different-tag2"], "unread": False},
{
"tag_names": ["different-tag1", "different-tag2"],
"unread": False,
"shared": False,
},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
),
(
["bookmarks", "update", "12", "--unread"],
"aiolinkding.bookmark.BookmarkManager.async_update",
[12],
{"unread": True},
{"unread": True, "shared": False},
BOOKMARKS_SINGLE_RESPONSE,
json.dumps(BOOKMARKS_SINGLE_RESPONSE),
),
Expand Down

0 comments on commit 0c7688f

Please sign in to comment.