aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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)