blob: e5e0d7caa86d698ab4b683433a8ed3bd8ef0d296 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import pytest
@pytest.mark.vcr()
def test_bookmarks(api, status):
status_bookmarked = api.status_bookmark(status)
assert status_bookmarked
assert status_bookmarked.bookmarked == True
bookmarked_statuses = api.bookmarks()
assert bookmarked_statuses
assert len(bookmarked_statuses) > 0
assert status_bookmarked == bookmarked_statuses[0]
bookmarked_statuses = api.bookmarks(limit=1)
assert bookmarked_statuses
assert len(bookmarked_statuses) > 0
assert status_bookmarked == bookmarked_statuses[0]
status_unbookmarked = api.status_unbookmark(status_bookmarked)
assert status_unbookmarked
assert status_unbookmarked.bookmarked == False
bookmarked_statuses_2 = api.bookmarks()
assert not bookmarked_statuses_2 is None
assert len(bookmarked_statuses_2) == len(bookmarked_statuses) - 1
|