diff options
-rw-r--r-- | tests/test_account.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/test_account.py b/tests/test_account.py index 4936c11..0a2e870 100644 --- a/tests/test_account.py +++ b/tests/test_account.py | |||
@@ -30,9 +30,25 @@ def test_account_relationships(api): | |||
30 | @pytest.mark.vcr() | 30 | @pytest.mark.vcr() |
31 | def test_account_search(api): | 31 | def test_account_search(api): |
32 | results = api.account_search('admin') | 32 | results = api.account_search('admin') |
33 | admin_acc = results[0] | ||
34 | |||
33 | assert isinstance(results, list) | 35 | assert isinstance(results, list) |
36 | assert len(results) == 1 | ||
34 | 37 | ||
35 | 38 | api.account_follow(admin_acc) | |
39 | results = api.account_search('admin', following = True) | ||
40 | assert isinstance(results, list) | ||
41 | assert len(results) == 1 | ||
42 | |||
43 | api.account_unfollow(admin_acc) | ||
44 | results = api.account_search('admin', following = True) | ||
45 | assert isinstance(results, list) | ||
46 | assert len(results) == 0 | ||
47 | |||
48 | results = api.account_search('admin') | ||
49 | assert isinstance(results, list) | ||
50 | assert len(results) == 1 | ||
51 | |||
36 | @pytest.mark.vcr() | 52 | @pytest.mark.vcr() |
37 | def test_account_follow_unfollow(api): | 53 | def test_account_follow_unfollow(api): |
38 | relationship = api.account_follow(1) | 54 | relationship = api.account_follow(1) |
@@ -145,4 +161,4 @@ def test_account_pinned(status, status2, api): | |||
145 | assert status in pinned | 161 | assert status in pinned |
146 | assert not status2 in pinned | 162 | assert not status2 in pinned |
147 | finally: | 163 | finally: |
148 | api.status_unpin(status['id']) \ No newline at end of file | 164 | api.status_unpin(status['id']) |