Mastodonplus.py/tests/test_search.py

18 líneas
503 B
Python

2017-11-30 02:13:44 +01:00
import pytest
@pytest.mark.vcr()
def test_search(api):
2019-04-28 21:15:47 +02:00
results = api.search_v1('mastodonpy_test')
assert isinstance(results, dict)
results = api.search_v2('mastodonpy_test')
assert isinstance(results, dict)
2017-11-30 02:13:44 +01:00
results = api.search('mastodonpy_test')
assert isinstance(results, dict)
2019-04-28 21:15:47 +02:00
results = api.search('mastodonpy_test', result_type="statuses")
assert isinstance(results, dict)
assert len(results["hashtags"]) == 0
assert len(results["accounts"]) == 0