From a9fe959ea1b8194df783fb4fc6462cf6cd24984e Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Mon, 24 Mar 2025 17:48:15 +0400 Subject: [PATCH] Fix unit tests for latest yt-dlp (Yt-dlp title is now truncated) --- tests/extractors/test_extractor_base.py | 4 ++-- tests/extractors/test_generic_extractor.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/extractors/test_extractor_base.py b/tests/extractors/test_extractor_base.py index 0240529..813de90 100644 --- a/tests/extractors/test_extractor_base.py +++ b/tests/extractors/test_extractor_base.py @@ -25,5 +25,5 @@ class TestExtractorBase(object): else: assert status == test_response.status - assert title == test_response.get_title() - assert timestamp, test_response.get("timestamp") + assert title in test_response.get_title() + assert timestamp == test_response.get("timestamp") diff --git a/tests/extractors/test_generic_extractor.py b/tests/extractors/test_generic_extractor.py index 616183b..85a0364 100644 --- a/tests/extractors/test_generic_extractor.py +++ b/tests/extractors/test_generic_extractor.py @@ -218,7 +218,7 @@ class TestGenericExtractor(TestExtractorBase): post = self.extractor.download(make_item(url)) self.assertValidResponseMetadata( post, - "Bellingcat - This month's Bellingchat Premium is with @KolinaKoltai. She reveals how she investigated a platform allowing users to create AI-generated child sexual abuse material and explains why it's crucial to investigate the people behind these services", + "Bellingcat - This month's Bellingchat Premium is with @KolinaKoltai", datetime.datetime(2024, 12, 24, 13, 44, 46, tzinfo=datetime.timezone.utc), )