From d8a6f2365e3986df3317523b71788962cde5e9a5 Mon Sep 17 00:00:00 2001 From: FaridRasidov Date: Sun, 28 Jul 2024 16:20:40 +0330 Subject: [PATCH] Add: 4 More Auth Tests Added --- tests/test_api_me.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/test_api_me.py diff --git a/tests/test_api_me.py b/tests/test_api_me.py new file mode 100644 index 0000000..12df7c8 --- /dev/null +++ b/tests/test_api_me.py @@ -0,0 +1,35 @@ +import pytest +from soundcld.api_handler import SoundCloud +from data_types import * + +@pytest.fixture +def soundcloud_client(): + client = SoundCloud(auth=True) + return client + +def test_get_my_liked_track_ids(soundcloud_client): + client = soundcloud_client + track_ids = client.get_my_liked_track_ids() + for track in track_ids: + assert isinstance(track, int) + +def test_get_my_reposts_ids(soundcloud_client): + client = soundcloud_client + repost_ids = client.get_my_reposts_ids() + for repost in repost_ids: + assert isinstance(repost, int) + +def test_get_my_followers_ids(soundcloud_client): + client = soundcloud_client + followers_id = client.get_my_followers_ids() + for follower in followers_id: + assert isinstance(follower, int) + +def test_get_my_following_ids(soundcloud_client): + client = soundcloud_client + following_id = client.get_my_following_ids() + for following in following_id: + assert isinstance(following, int) + +if __name__ == '__main__': + pytest.main() \ No newline at end of file