Add regression test for account_search
This commit is contained in:
pare
82cc87b49b
commit
21464aa3c6
S'han modificat 1 arxius amb 18 adicions i 2 eliminacions
|
@ -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'])
|
||||
|
|
Loading…
Referencia en una nova incidència