Skip to content

Commit

Permalink
added svg to testing
Browse files Browse the repository at this point in the history
  • Loading branch information
thomascooper committed Oct 25, 2024
1 parent 02c30fe commit 2085798
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/sources/test_mediafly.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"modifiedBy": "[email protected]",
"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,
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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__":
Expand Down

0 comments on commit 2085798

Please sign in to comment.