-
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
4cb2105
commit ea58f98
Showing
2 changed files
with
36 additions
and
3 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,31 @@ | ||
import pytest | ||
from soundcld.api_handler import SoundCloud | ||
from data_types import * | ||
|
||
@pytest.fixture | ||
def soundcloud_client(): | ||
user_id = 513663489 | ||
client = SoundCloud(auth=True) | ||
return client, user_id | ||
|
||
def test_get_my_conversations_thumb(soundcloud_client): | ||
client, user_id = soundcloud_client | ||
conversation_thumbs = client.get_my_conversations_thumb() | ||
for conversation in conversation_thumbs: | ||
assert isinstance(conversation, Conversation) | ||
|
||
def test_get_my_unread_conversations(soundcloud_client): | ||
client, user_id = soundcloud_client | ||
conversation_unread = client.get_my_unread_conversations() | ||
for conversation in conversation_unread: | ||
assert isinstance(conversation, Conversation) | ||
|
||
def test_get_my_user_conversation(soundcloud_client): | ||
client, user_id = soundcloud_client | ||
conversation_messages = client.get_my_user_conversation(user_id) | ||
for message in conversation_messages: | ||
assert isinstance(message, Message) | ||
|
||
|
||
if __name__ == '__main__': | ||
pytest.main() |