2017-11-30 00:54:52 +00:00
|
|
|
import pytest
|
2019-06-22 21:16:47 +00:00
|
|
|
import time
|
2017-11-30 00:54:52 +00:00
|
|
|
|
|
|
|
@pytest.mark.vcr()
|
2022-11-07 21:11:30 +00:00
|
|
|
def test_follow_requests(api):
|
|
|
|
reqs = api.follow_requests()
|
2017-11-30 00:54:52 +00:00
|
|
|
assert isinstance(reqs, list)
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.vcr()
|
2022-11-07 21:11:30 +00:00
|
|
|
def test_follow_request_authorize(api, api2):
|
2022-11-13 13:33:10 +00:00
|
|
|
api_id = api.account_verify_credentials()
|
|
|
|
api2.account_follow(api_id)
|
2019-06-22 21:16:47 +00:00
|
|
|
time.sleep(2)
|
2022-11-07 21:11:30 +00:00
|
|
|
request = api.follow_requests()[0]
|
|
|
|
api.follow_request_authorize(request)
|
2022-11-13 13:33:10 +00:00
|
|
|
api2.account_unfollow(api_id)
|
2017-11-30 00:54:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.vcr()
|
2022-11-07 21:11:30 +00:00
|
|
|
def test_follow_request_reject(api, api2):
|
2022-11-13 13:33:10 +00:00
|
|
|
api2.account_follow(api.account_verify_credentials())
|
2019-06-22 21:16:47 +00:00
|
|
|
time.sleep(2)
|
2022-11-07 21:11:30 +00:00
|
|
|
request = api.follow_requests()[0]
|
|
|
|
api.follow_request_reject(request)
|
2017-11-30 00:54:52 +00:00
|
|
|
|
|
|
|
|