From b7266db01b73348bb74dd4277053825580193477 Mon Sep 17 00:00:00 2001 From: halcy Date: Thu, 24 Nov 2022 00:59:48 +0200 Subject: Add new notification types, test for pathlib support --- tests/test_media.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/test_media.py') 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 @@ import pytest import vcr import time +import pathlib @pytest.mark.vcr(match_on=['path']) def test_media_post_v1(api): @@ -127,3 +128,10 @@ def test_media_post_file(api): with open('tests/image.jpg', 'rb') as f: media = api.media_post(f, mime_type='image/jpeg') assert media + +@pytest.mark.vcr(match_on=['path']) +def test_media_post_pathlib(api): + path = pathlib.Path(".") / "tests" / "image.jpg" + media = api.media_post(path) + assert media + \ No newline at end of file -- cgit v1.2.3