From 47167a725c9ce9d5e0a2d37b105c3999ecdda371 Mon Sep 17 00:00:00 2001 From: Dysta Date: Wed, 7 Aug 2024 22:37:38 +0200 Subject: [PATCH] fix: bad tests --- tests/test_music_request.py | 26 +++++++++++++++----------- tests/test_stream_request.py | 26 +++++++++++++++----------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/tests/test_music_request.py b/tests/test_music_request.py index d6a99f9..1704dfe 100644 --- a/tests/test_music_request.py +++ b/tests/test_music_request.py @@ -44,7 +44,9 @@ async def test_music_request_success_youtube_live_url(self): async def test_music_request_success_soundcloud_url(self): with disable_logging(): - async with MusicRequest("https://soundcloud.com/gee_baller/playboi-carti-cult-classic") as req: + async with MusicRequest( + "https://soundcloud.com/wstd7331/skychaser-1045-sky-fm-2nd-part-slowed-and-reverb" + ) as req: await req.execute() self.assertTrue(req.success) @@ -53,13 +55,13 @@ async def test_music_request_success_soundcloud_url(self): result: dict = req.result - self.assertEqual(result.get("title"), "Playboi Carti – Cult Classic") - self.assertEqual(result.get("uploader"), "Gee Baller") + self.assertEqual(result.get("title"), "Skychaser - 104.5 Sky FM (2nd Part, Slowed And Reverb)") + self.assertEqual(result.get("uploader"), "[wstd7331]") self.assertEqual( result.get("webpage_url"), - "https://soundcloud.com/gee_baller/playboi-carti-cult-classic", + "https://soundcloud.com/wstd7331/skychaser-1045-sky-fm-2nd-part-slowed-and-reverb", ) - self.assertEqual(round(result.get("duration")), 118) + self.assertEqual(round(result.get("duration")), 201) self.assertIsNone(result.get("thumbnail")) async def test_music_request_playlist_youtube_url(self): @@ -286,7 +288,9 @@ async def test_music_request_youtube_query_convert_to_result(self): async def test_music_request_success_soundcloud_url_convert_to_result(self): with disable_logging(): - async with MusicRequest("https://soundcloud.com/gee_baller/playboi-carti-cult-classic") as req: + async with MusicRequest( + "https://soundcloud.com/wstd7331/skychaser-1045-sky-fm-2nd-part-slowed-and-reverb" + ) as req: await req.execute() self.assertTrue(req.success) @@ -295,14 +299,14 @@ async def test_music_request_success_soundcloud_url_convert_to_result(self): result: Result = Result(req.result) - self.assertEqual(result.title, "Playboi Carti – Cult Classic") - self.assertEqual(result.channel, "Gee Baller") + self.assertEqual(result.title, "Skychaser - 104.5 Sky FM (2nd Part, Slowed And Reverb)") + self.assertEqual(result.channel, "[wstd7331]") self.assertEqual( result.web_url, - "https://soundcloud.com/gee_baller/playboi-carti-cult-classic", + "https://soundcloud.com/wstd7331/skychaser-1045-sky-fm-2nd-part-slowed-and-reverb", ) - self.assertEqual(result.duration, 118) - self.assertEqual(result.fmt_duration, "1:58") + self.assertEqual(result.duration, 201) + self.assertEqual(result.fmt_duration, "3:21") self.assertFalse(result.live) self.assertIsNone(result.requester) diff --git a/tests/test_stream_request.py b/tests/test_stream_request.py index ec874e8..649043a 100644 --- a/tests/test_stream_request.py +++ b/tests/test_stream_request.py @@ -29,7 +29,9 @@ async def test_stream_request_success_youtube(self): async def test_stream_request_success_soundcloud(self): with disable_logging(): - async with StreamRequest("https://soundcloud.com/gee_baller/playboi-carti-cult-classic") as req: + async with StreamRequest( + "https://soundcloud.com/wstd7331/skychaser-1045-sky-fm-2nd-part-slowed-and-reverb" + ) as req: await req.execute() self.assertTrue(req.success) @@ -38,13 +40,13 @@ async def test_stream_request_success_soundcloud(self): result: dict = req.result - self.assertEqual(result.get("title"), "Playboi Carti – Cult Classic") - self.assertEqual(result.get("uploader"), "Gee Baller") + self.assertEqual(result.get("title"), "Skychaser - 104.5 Sky FM (2nd Part, Slowed And Reverb)") + self.assertEqual(result.get("uploader"), "[wstd7331]") self.assertEqual( result.get("webpage_url"), - "https://soundcloud.com/gee_baller/playboi-carti-cult-classic", + "https://soundcloud.com/wstd7331/skychaser-1045-sky-fm-2nd-part-slowed-and-reverb", ) - self.assertEqual(round(result.get("duration")), 118) + self.assertEqual(round(result.get("duration")), 201) self.assertIsNotNone(result.get("thumbnail", None)) self.assertIsNotNone(result.get("url", None)) @@ -118,7 +120,9 @@ async def test_stream_request_success_youtube_live_convert_to_song(self): async def test_stream_request_success_soundcloud_convert_to_song(self): with disable_logging(): - async with StreamRequest("https://soundcloud.com/gee_baller/playboi-carti-cult-classic") as req: + async with StreamRequest( + "https://soundcloud.com/wstd7331/skychaser-1045-sky-fm-2nd-part-slowed-and-reverb" + ) as req: await req.execute() self.assertTrue(req.success) @@ -127,14 +131,14 @@ async def test_stream_request_success_soundcloud_convert_to_song(self): result: Song = Song(req.result) - self.assertEqual(result.title, "Playboi Carti – Cult Classic") - self.assertEqual(result.channel, "Gee Baller") + self.assertEqual(result.title, "Skychaser - 104.5 Sky FM (2nd Part, Slowed And Reverb)") + self.assertEqual(result.channel, "[wstd7331]") self.assertEqual( result.web_url, - "https://soundcloud.com/gee_baller/playboi-carti-cult-classic", + "https://soundcloud.com/wstd7331/skychaser-1045-sky-fm-2nd-part-slowed-and-reverb", ) - self.assertEqual(result.duration, 118) - self.assertEqual(result.fmt_duration, "1:58") + self.assertEqual(result.duration, 201) + self.assertEqual(result.fmt_duration, "3:21") self.assertIsNotNone(result.thumbnail) self.assertIsNotNone(result.stream_url)