forked from fbchat-dev/fbchat
-
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
Showing
3 changed files
with
61 additions
and
1 deletion.
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
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,42 @@ | ||
import pytest | ||
import fbchat | ||
|
||
pytestmark = pytest.mark.online | ||
|
||
|
||
# TODO: Verify return values | ||
|
||
|
||
def test_wave(any_thread): | ||
assert any_thread.wave(True) | ||
assert any_thread.wave(False) | ||
|
||
|
||
def test_send_text(any_thread): | ||
assert any_thread.send_text("Test") | ||
|
||
|
||
def test_send_text_with_mention(any_thread): | ||
mention = fbchat.Mention(thread_id=any_thread.id, offset=5, length=8) | ||
assert any_thread.send_text("Test @mention", mentions=[mention]) | ||
|
||
|
||
def test_send_emoji(any_thread): | ||
assert any_thread.send_emoji("😀", size=fbchat.EmojiSize.LARGE) | ||
|
||
|
||
def test_send_sticker(any_thread): | ||
assert any_thread.send_sticker("1889713947839631") | ||
|
||
|
||
def test_send_location(any_thread): | ||
any_thread.send_location(51.5287718, -0.2416815) | ||
|
||
|
||
def test_send_pinned_location(any_thread): | ||
any_thread.send_pinned_location(39.9390731, 116.117273) | ||
|
||
|
||
@pytest.mark.skip(reason="need a way to use the uploaded files from test_client.py") | ||
def test_send_files(any_thread): | ||
pass |