From ad45ea70a0d14d7577fb4a6539a2a5a662f0d31d Mon Sep 17 00:00:00 2001 From: Raventric <78981416+Ravencentric@users.noreply.github.com> Date: Sat, 16 Mar 2024 19:20:10 +0530 Subject: [PATCH] ci: 3 seconds, it's joever --- tests/test_anilist.py | 18 +++++++++--------- tests/test_async_anilist.py | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/test_anilist.py b/tests/test_anilist.py index 2feb2b4..3732275 100644 --- a/tests/test_anilist.py +++ b/tests/test_anilist.py @@ -15,7 +15,7 @@ def test_anilist() -> None: - time.sleep(2) + time.sleep(3) media = Anilist().search("Attack on titan") assert media.title.romaji == "Shingeki no Kyojin" assert media.start_date.year == 2013 @@ -25,7 +25,7 @@ def test_anilist() -> None: def test_anilist_with_type_constraint() -> None: - time.sleep(2) + time.sleep(3) media = Anilist().search("Attack on titan", type=MediaType.MANGA) assert media.title.romaji == "Shingeki no Kyojin" assert media.start_date.year == 2009 @@ -35,7 +35,7 @@ def test_anilist_with_type_constraint() -> None: def test_anilist_with_some_constraints() -> None: - time.sleep(2) + time.sleep(3) media = Anilist().search( "violet evergarden", type=MediaType.MANGA, format=MediaFormat.NOVEL, status=MediaStatus.FINISHED ) @@ -47,7 +47,7 @@ def test_anilist_with_some_constraints() -> None: def test_anilist_with_all_constraints() -> None: - time.sleep(2) + time.sleep(3) media = Anilist().search( "My Hero Academia", season=MediaSeason.SPRING, @@ -64,25 +64,25 @@ def test_anilist_with_all_constraints() -> None: def test_anilist_title_doesnt_exist() -> None: - time.sleep(2) + time.sleep(3) with pytest.raises(HTTPStatusError, match="Not Found."): Anilist().search("Title does not exist", type=MediaType.MANGA) def test_anilist_bad_search_combo() -> None: - time.sleep(2) + time.sleep(3) with pytest.raises(HTTPStatusError, match="Not Found."): Anilist().search("Attack on titan", season_year=1999) def test_anilist_wrong_input_types() -> None: - time.sleep(2) + time.sleep(3) with pytest.raises(ValidationError): Anilist().search(123456789, season_year="hello", type=True) # type: ignore def test_anilist_id() -> None: - time.sleep(2) + time.sleep(3) media = Anilist().get(16498) assert media.title.romaji == "Shingeki no Kyojin" assert media.start_date.year == 2013 @@ -92,6 +92,6 @@ def test_anilist_id() -> None: def test_anilist_bad_id() -> None: - time.sleep(2) + time.sleep(3) with pytest.raises(HTTPStatusError, match="400 Bad Request"): Anilist().get(9999999999) diff --git a/tests/test_async_anilist.py b/tests/test_async_anilist.py index d07c7b7..c015a42 100644 --- a/tests/test_async_anilist.py +++ b/tests/test_async_anilist.py @@ -15,7 +15,7 @@ async def test_anilist() -> None: - time.sleep(2) + time.sleep(3) media = await AsyncAnilist().search("Attack on titan") assert media.title.romaji == "Shingeki no Kyojin" assert media.start_date.year == 2013 @@ -25,7 +25,7 @@ async def test_anilist() -> None: async def test_anilist_with_type_constraint() -> None: - time.sleep(2) + time.sleep(3) media = await AsyncAnilist().search("Attack on titan", type=MediaType.MANGA) assert media.title.romaji == "Shingeki no Kyojin" assert media.start_date.year == 2009 @@ -35,7 +35,7 @@ async def test_anilist_with_type_constraint() -> None: async def test_anilist_with_some_constraints() -> None: - time.sleep(2) + time.sleep(3) media = await AsyncAnilist().search( "violet evergarden", type=MediaType.MANGA, format=MediaFormat.NOVEL, status=MediaStatus.FINISHED ) @@ -47,7 +47,7 @@ async def test_anilist_with_some_constraints() -> None: async def test_anilist_with_all_constraints() -> None: - time.sleep(2) + time.sleep(3) media = await AsyncAnilist().search( "My Hero Academia", season=MediaSeason.SPRING, @@ -64,25 +64,25 @@ async def test_anilist_with_all_constraints() -> None: async def test_anilist_title_doesnt_exist() -> None: - time.sleep(2) + time.sleep(3) with pytest.raises(HTTPStatusError, match="Not Found."): await AsyncAnilist().search("Title does not exist", type=MediaType.MANGA) async def test_anilist_bad_search_combo() -> None: - time.sleep(2) + time.sleep(3) with pytest.raises(HTTPStatusError, match="Not Found."): await AsyncAnilist().search("Attack on titan", season_year=1999) async def test_anilist_wrong_input_types() -> None: - time.sleep(2) + time.sleep(3) with pytest.raises(ValidationError): await AsyncAnilist().search(123456789, season_year="hello", type=True) # type: ignore async def test_anilist_id() -> None: - time.sleep(2) + time.sleep(3) media = await AsyncAnilist().get(16498) assert media.title.romaji == "Shingeki no Kyojin" assert media.start_date.year == 2013 @@ -92,6 +92,6 @@ async def test_anilist_id() -> None: async def test_anilist_bad_id() -> None: - time.sleep(2) + time.sleep(3) with pytest.raises(HTTPStatusError, match="400 Bad Request"): await AsyncAnilist().get(9999999999)