Fix convert yt url message being too long

* Add long message check
* Minor lint rule fix
This commit is contained in:
BreadTube 2026-05-14 23:20:55 +09:00
commit 6d84205425
5 changed files with 60 additions and 22 deletions

View file

@ -8,7 +8,7 @@ from breadtube_bot.youtube_subscription import ChannelInfo
def test_rss_parsing():
logger = logging.getLogger('breadtube-bot-test')
manager = YoutubeManager('', logger=logger)
channel_info, videos = manager._parse_rss_data(Path('tests/data/rss_feed_sample.xml').read_text(encoding='utf-8'))
channel_info, videos = manager._parse_rss_data(Path('tests/data/rss_feed_sample.xml'))
assert channel_info == ChannelInfo(
channel_id='UCFemKOoYVrTGUhuVzuNPt4A', title='Actu Réfractaire',
url='https://www.youtube.com/channel/UCFemKOoYVrTGUhuVzuNPt4A')