From 208579890f21ea5ac7d4a36dcd3a152198493871 Mon Sep 17 00:00:00 2001 From: Thomas Cooper Date: Fri, 25 Oct 2024 16:48:55 -0400 Subject: [PATCH] added svg to testing --- tests/sources/test_mediafly.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/sources/test_mediafly.py b/tests/sources/test_mediafly.py index b9e6e5db6..35d9a99d8 100644 --- a/tests/sources/test_mediafly.py +++ b/tests/sources/test_mediafly.py @@ -77,6 +77,23 @@ "shareLinks": [], "fileType": "pdf", } +MOCK_MEDIAFLY_ITEM_SVG = { + "id": "111226", + "parentId": "654321", + "type": "file", + "modified": "2024-10-20T18:26:23.000000Z", + "created": "2024-10-20T18:26:06.000000Z", + "createdBy": "another_person@example.com", + "modifiedBy": "another_person@example.com", + "asset": { + "id": "abc127", + "filename": "image_file.svg", + "size": 1025, + "downloadUrl": "https://localhost/image_file.svg", + }, + "shareLinks": [], + "fileType": "svg", +} MOCK_MEDIAFLY_CHILD_ITEMS = [ MOCK_MEDIAFLY_ITEM_TXT, @@ -747,6 +764,7 @@ async def test__pre_checks_for_get_docs_with_include_internal_only_files(self): assert source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_TXT["asset"]) assert source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_PPTX["asset"]) assert not source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_PNG["asset"]) + assert source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_SVG["asset"]) @pytest.mark.asyncio async def test__pre_checks_for_get_docs_with_excluded_file_types(self): @@ -757,6 +775,7 @@ async def test__pre_checks_for_get_docs_with_excluded_file_types(self): assert source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_TXT["asset"]) assert not source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_PPTX["asset"]) assert not source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_PNG["asset"]) + assert source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_SVG["asset"]) @pytest.mark.asyncio async def test__pre_checks_for_get_docs_with_excluded_file_types_all_files(self): @@ -767,6 +786,7 @@ async def test__pre_checks_for_get_docs_with_excluded_file_types_all_files(self) assert not source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_TXT["asset"]) assert not source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_PPTX["asset"]) assert not source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_PNG["asset"]) + assert source._pre_checks_for_get_docs(MOCK_MEDIAFLY_ITEM_SVG["asset"]) if __name__ == "__main__":