aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhalcy <halcy@ARARAGI-KUN>2022-11-24 00:59:48 +0200
committerhalcy <halcy@ARARAGI-KUN>2022-11-24 00:59:48 +0200
commitb7266db01b73348bb74dd4277053825580193477 (patch)
treea2b713e866298046f8f4fa2bf93566371ded9651 /tests/test_media.py
parent34280e604ce1caf56b3fa0b8501d82bc498b3975 (diff)
downloadmastodon.py-b7266db01b73348bb74dd4277053825580193477.tar.gz
Add new notification types, test for pathlib support
Diffstat (limited to 'tests/test_media.py')
-rw-r--r--tests/test_media.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_media.py b/tests/test_media.py
index e16fb4d..9b34900 100644
--- a/tests/test_media.py
+++ b/tests/test_media.py
@@ -1,6 +1,7 @@
1import pytest 1import pytest
2import vcr 2import vcr
3import time 3import time
4import pathlib
4 5
5@pytest.mark.vcr(match_on=['path']) 6@pytest.mark.vcr(match_on=['path'])
6def test_media_post_v1(api): 7def test_media_post_v1(api):
@@ -127,3 +128,10 @@ def test_media_post_file(api):
127 with open('tests/image.jpg', 'rb') as f: 128 with open('tests/image.jpg', 'rb') as f:
128 media = api.media_post(f, mime_type='image/jpeg') 129 media = api.media_post(f, mime_type='image/jpeg')
129 assert media 130 assert media
131
132@pytest.mark.vcr(match_on=['path'])
133def test_media_post_pathlib(api):
134 path = pathlib.Path(".") / "tests" / "image.jpg"
135 media = api.media_post(path)
136 assert media
137 \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)