diff options
author | codl <[email protected]> | 2017-11-27 14:35:02 +0100 |
---|---|---|
committer | codl <[email protected]> | 2017-11-27 14:35:02 +0100 |
commit | 304145f4420180b23e0836a6d11fc0cec0e341bd (patch) | |
tree | e35d03c41a4f6b3f11c52257b62d0c4666ea9ce3 /tests/test_timeline.py | |
parent | cfc9c1ce0c6440506d3a88397c65ad47bdd2d662 (diff) | |
download | mastodon.py-304145f4420180b23e0836a6d11fc0cec0e341bd.tar.gz |
rename mastodon and mastodon_anonymous fixtures to api, api_anonymous
it was starting to get confusing
Diffstat (limited to 'tests/test_timeline.py')
-rw-r--r-- | tests/test_timeline.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_timeline.py b/tests/test_timeline.py index 0306391..492d0c7 100644 --- a/tests/test_timeline.py +++ b/tests/test_timeline.py | |||
@@ -1,8 +1,8 @@ | |||
1 | import pytest | 1 | import pytest |
2 | 2 | ||
3 | @pytest.mark.vcr() | 3 | @pytest.mark.vcr() |
4 | def test_public_tl_anonymous(mastodon_anonymous, status): | 4 | def test_public_tl_anonymous(api_anonymous, status): |
5 | tl = mastodon_anonymous.timeline_public() | 5 | tl = api_anonymous.timeline_public() |
6 | assert status['id'] in map(lambda st: st['id'], tl) | 6 | assert status['id'] in map(lambda st: st['id'], tl) |
7 | # although tempting, we can't do | 7 | # although tempting, we can't do |
8 | # assert status in tl | 8 | # assert status in tl |
@@ -10,21 +10,21 @@ def test_public_tl_anonymous(mastodon_anonymous, status): | |||
10 | # pagination-related attributes | 10 | # pagination-related attributes |
11 | 11 | ||
12 | @pytest.mark.vcr() | 12 | @pytest.mark.vcr() |
13 | def test_public_tl(mastodon, status): | 13 | def test_public_tl(api, status): |
14 | tl = mastodon.timeline_public() | 14 | tl = api.timeline_public() |
15 | print(tl[0]) | 15 | print(tl[0]) |
16 | assert status['id'] in map(lambda st: st['id'], tl) | 16 | assert status['id'] in map(lambda st: st['id'], tl) |
17 | 17 | ||
18 | @pytest.mark.vcr() | 18 | @pytest.mark.vcr() |
19 | def test_home_tl(mastodon, status): | 19 | def test_home_tl(api, status): |
20 | tl = mastodon.timeline_home() | 20 | tl = api.timeline_home() |
21 | assert status['id'] in map(lambda st: st['id'], tl) | 21 | assert status['id'] in map(lambda st: st['id'], tl) |
22 | 22 | ||
23 | @pytest.mark.vcr() | 23 | @pytest.mark.vcr() |
24 | def test_hashtag_tl(mastodon): | 24 | def test_hashtag_tl(api): |
25 | status = mastodon.status_post('#hoot (hashtag toot)') | 25 | status = api.status_post('#hoot (hashtag toot)') |
26 | tl = mastodon.timeline_hashtag('hoot') | 26 | tl = api.timeline_hashtag('hoot') |
27 | try: | 27 | try: |
28 | assert status['id'] in map(lambda st: st['id'], tl) | 28 | assert status['id'] in map(lambda st: st['id'], tl) |
29 | finally: | 29 | finally: |
30 | mastodon.status_delete(status['id']) | 30 | api.status_delete(status['id']) |