mirror of
https://github.com/Dineshkarthik/telegram_media_downloader.git
synced 2024-12-28 01:33:00 +08:00
test: add test to download skipped files logic
This commit is contained in:
parent
5e34342cb9
commit
6c23daaa89
1 changed files with 13 additions and 1 deletions
|
@ -29,7 +29,7 @@ MOCK_CONF = {
|
||||||
"api_hash": "hasw5Tgawsuj67",
|
"api_hash": "hasw5Tgawsuj67",
|
||||||
"last_read_message_id": 0,
|
"last_read_message_id": 0,
|
||||||
"chat_id": 8654123,
|
"chat_id": 8654123,
|
||||||
"ids_to_retry": [],
|
"ids_to_retry": [1],
|
||||||
"media_types": ["audio", "voice"],
|
"media_types": ["audio", "voice"],
|
||||||
"file_formats": {"audio": ["all"], "voice": ["all"]},
|
"file_formats": {"audio": ["all"], "voice": ["all"]},
|
||||||
}
|
}
|
||||||
|
@ -203,6 +203,18 @@ class MockClient:
|
||||||
mime_type="video/mov",
|
mime_type="video/mov",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
elif kwargs["message_ids"] == [1]:
|
||||||
|
message = [
|
||||||
|
MockMessage(
|
||||||
|
id=1,
|
||||||
|
media=True,
|
||||||
|
chat_id=234568,
|
||||||
|
video=MockVideo(
|
||||||
|
file_name="sample_video.mov",
|
||||||
|
mime_type="video/mov",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
]
|
||||||
return message
|
return message
|
||||||
|
|
||||||
async def download_media(self, *args, **kwargs):
|
async def download_media(self, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue