aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-07-14 01:03:42 +0200
committerLorenz Diener <[email protected]>2018-07-14 01:03:42 +0200
commit21464aa3c66401b022e49eac4d279ba380dcaf16 (patch)
tree091f376b6714001cfad0499243b2b2a55cd4700b /tests
parent82cc87b49b2e0781470e6b1276fac455ad4190e8 (diff)
downloadmastodon.py-21464aa3c66401b022e49eac4d279ba380dcaf16.tar.gz
Add regression test for account_search
Diffstat (limited to 'tests')
-rw-r--r--tests/test_account.py20
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()
31def test_account_search(api): 31def 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()
37def test_account_follow_unfollow(api): 53def 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'])
Powered by cgit v1.2.3 (git 2.41.0)