forked from elastic/connectors
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02c30fe
commit 2085798
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
|
@@ -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__": | ||
|