-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c42e28e
commit c821253
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import pytest | ||
from soundcld.api_handler import SoundCloud | ||
from data_types import * | ||
|
||
@pytest.fixture | ||
def soundcloud_client(): | ||
prompt = 'witch house' | ||
client = SoundCloud() | ||
return client, prompt | ||
|
||
def test_get_track_by_tag(soundcloud_client): | ||
client, prompt = soundcloud_client | ||
all_tagged_tracks = client.get_track_by_tag(prompt) | ||
i = 0 | ||
for track in all_tagged_tracks: | ||
if i > 20: | ||
break | ||
i += 1 | ||
assert isinstance(track, BasicTrack) | ||
|
||
if __name__ == '__main__': | ||
pytest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters