From 9227528a1504ec79cf5af8e4aa15c702215abb3c Mon Sep 17 00:00:00 2001 From: codl Date: Thu, 30 Nov 2017 01:54:52 +0100 Subject: add tests for follow request methods --- tests/test_follow_requests.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/test_follow_requests.py (limited to 'tests/test_follow_requests.py') 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 @@ +import pytest + +@pytest.mark.vcr() +def test_follow_requests(api): + reqs = api.follow_requests() + assert isinstance(reqs, list) + + +# warning: these two send emails, which open in letter opener by default +# so if you are re-recording a cassette for either of these mastodon will +# probably open a browser window for you, which you can safely close +@pytest.mark.vcr() +def test_follow_request_authorize(api, api2): + api2.account_follow(1234567890123456) + api.follow_request_authorize(1) + api2.account_unfollow(1234567890123456) + + +@pytest.mark.vcr() +def test_follow_request_reject(api, api2): + api2.account_follow(1234567890123456) + api.follow_request_reject(1) + + -- cgit v1.2.3