feat: filter site bodies before media upload
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import asyncio
|
||||
from pathlib import Path
|
||||
|
||||
from vk_parser_app.workers.vk_storage_uploader import TelegramStorageUploader, video_provider
|
||||
from vk_parser_app.workers.media_uploader import MediaUploader, video_provider
|
||||
|
||||
|
||||
class FakeContent:
|
||||
@@ -35,7 +35,7 @@ def test_video_provider() -> None:
|
||||
|
||||
async def test_http_video_download() -> None:
|
||||
path = "/tmp/vkparser_tg_media_http_test.mp4"
|
||||
result = await TelegramStorageUploader().download_http_video(FakeSession(), "https://example.test/a.mp4", path)
|
||||
result = await MediaUploader().download_http_video(FakeSession(), "https://example.test/a.mp4", path)
|
||||
assert result["size_bytes"] == 5
|
||||
assert Path(path).read_bytes() == b"video"
|
||||
Path(path).unlink()
|
||||
|
||||
Reference in New Issue
Block a user