diff options
author | codl <[email protected]> | 2017-11-30 01:54:52 +0100 |
---|---|---|
committer | codl <[email protected]> | 2017-11-30 01:54:52 +0100 |
commit | 9227528a1504ec79cf5af8e4aa15c702215abb3c (patch) | |
tree | 528d1c2cf26d44f10506a29b3134ccef46dcbfa1 /tests/test_follow_requests.py | |
parent | 2b4008981055f990c23bf42bb65f856231436422 (diff) | |
download | mastodon.py-9227528a1504ec79cf5af8e4aa15c702215abb3c.tar.gz |
add tests for follow request methods
Diffstat (limited to 'tests/test_follow_requests.py')
-rw-r--r-- | tests/test_follow_requests.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_follow_requests.py b/tests/test_follow_requests.py new file mode 100644 index 0000000..67626f7 --- /dev/null +++ b/tests/test_follow_requests.py | |||
@@ -0,0 +1,24 @@ | |||
1 | import pytest | ||
2 | |||
3 | @pytest.mark.vcr() | ||
4 | def test_follow_requests(api): | ||
5 | reqs = api.follow_requests() | ||
6 | assert isinstance(reqs, list) | ||
7 | |||
8 | |||
9 | # warning: these two send emails, which open in letter opener by default | ||
10 | # so if you are re-recording a cassette for either of these mastodon will | ||
11 | # probably open a browser window for you, which you can safely close | ||
12 | @pytest.mark.vcr() | ||
13 | def test_follow_request_authorize(api, api2): | ||
14 | api2.account_follow(1234567890123456) | ||
15 | api.follow_request_authorize(1) | ||
16 | api2.account_unfollow(1234567890123456) | ||
17 | |||
18 | |||
19 | @pytest.mark.vcr() | ||
20 | def test_follow_request_reject(api, api2): | ||
21 | api2.account_follow(1234567890123456) | ||
22 | api.follow_request_reject(1) | ||
23 | |||
24 | |||