From 8753fa0e459b8e839347da51884e030300f8f222 Mon Sep 17 00:00:00 2001 From: Serene-Arc Date: Sun, 28 Mar 2021 10:05:45 +1000 Subject: [PATCH] Add additional test --- bulkredditdownloader/tests/downloaders/test_imgur.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bulkredditdownloader/tests/downloaders/test_imgur.py b/bulkredditdownloader/tests/downloaders/test_imgur.py index 66cbbd0..6645737 100644 --- a/bulkredditdownloader/tests/downloaders/test_imgur.py +++ b/bulkredditdownloader/tests/downloaders/test_imgur.py @@ -36,12 +36,17 @@ def test_get_data_album(test_url: str, expected_gen_dict: dict, expected_image_d assert any([all([image.get(key) == image_dict[key] for key in image_dict.keys()]) for image_dict in expected_image_dict for image in result['album_images']['images']]) + @pytest.mark.online @pytest.mark.parametrize(('test_url', 'expected_image_dict'), ( ('https://i.imgur.com/dLk3FGY.gifv', - {'hash': 'dLk3FGY', 'title': '', 'ext': '.mp4', 'animated': True}), + {'hash': 'dLk3FGY', 'title': '', 'ext': '.mp4', 'animated': True} + ), + ('https://i.imgur.com/dLk3FGY.gifv', + {'hash': 'dLk3FGY', 'title': '', 'ext': '.mp4'} + ), )) -def test_get_data_image(test_url: str, expected_image_dict: dict): +def test_get_data_gif(test_url: str, expected_image_dict: dict): result = Imgur._get_data(test_url) assert all([result.get(key) == expected_image_dict[key] for key in expected_image_dict.keys()])