Add regression test for account_search

This commit is contained in:
Lorenz Diener 2018-07-14 01:03:42 +02:00
pare 82cc87b49b
commit 21464aa3c6

Veure arxiu

@ -30,9 +30,25 @@ def test_account_relationships(api):
@pytest.mark.vcr()
def test_account_search(api):
results = api.account_search('admin')
admin_acc = results[0]
assert isinstance(results, list)
assert len(results) == 1
api.account_follow(admin_acc)
results = api.account_search('admin', following = True)
assert isinstance(results, list)
assert len(results) == 1
api.account_unfollow(admin_acc)
results = api.account_search('admin', following = True)
assert isinstance(results, list)
assert len(results) == 0
results = api.account_search('admin')
assert isinstance(results, list)
assert len(results) == 1
@pytest.mark.vcr()
def test_account_follow_unfollow(api):
relationship = api.account_follow(1)
@ -145,4 +161,4 @@ def test_account_pinned(status, status2, api):
assert status in pinned
assert not status2 in pinned
finally:
api.status_unpin(status['id'])
api.status_unpin(status['id'])