anime_list_apis.test.api package¶
Submodules¶
anime_list_apis.test.api.TestAnilistApi module¶
-
class
anime_list_apis.test.api.TestAnilistApi.
TestAnilistApi
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests the Anilist Api. May be subclassed to test other APIs as well
-
api_class
¶
-
setUp
()¶ Creates a cache :return: None
-
tearDown
()¶ Removes all generated files and directories :return: None
-
test_caching_anime
()¶ Tests that the caching works correctly for media data :return: None
-
test_checking_if_in_list
()¶ Tests the is_in_list() method :return: None
Tests fetching data for related data :return: None
-
test_fetching_with_invalid_id_type
()¶ Makes sure that trying to use an unsupported ID type results in a None object :return: None
-
test_getting_fresh_data
()¶ Tests retrieving fresh data :return: None
-
test_retrieving_data
()¶ Tests retrieving a data, user data and list entries for both anime and manga :return: None
-
test_retrieving_entry_for_non_existant_user
()¶ Tests retrieving an entry for a non-existant user :return: None
-
test_retrieving_invalid_entry
()¶ Tests retrieving invalid entries Assumptions: No ids < 0 or > 1000000000 :return: None
-
test_retrieving_list_for_nonexistant_user
()¶ Tests retrieving an anime list for an invalid user :return: None
-
test_retrieving_lists
()¶ Tests retrieving a user’s lists using various methods :return: None
-
test_retrieving_non_existant_list_entry
()¶ Tests retrieving entries that are not in a user’s list Uses very badly rated entries to make sure that they never get added to the list, breaking the test :return: None
-
valid_id_types
= [<IdType.ANILIST: 2>, <IdType.MYANIMELIST: 1>]¶ A list of valid ID types
-
-
class
anime_list_apis.test.api.TestAnilistApi.
TestAnilistApiSpecific
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Tests specifically for the Anilist API
-
setUp
()¶ Creates a cache :return: None
-
tearDown
()¶ Removes all generated files and directories :return: None
-
test_filling_in_english_title_with_romaji
()¶ Some titles don’t have an english title entry on anilist. In such cases, the romaji will automatically be filled in into the english title. :return: None
-
test_getting_anilist_id_from_mal_id
()¶ Tests retrieving an anilist ID for a myanimelist ID :return: None
-
test_getting_anilist_info_with_invalid_mal_id
()¶ Tests retrieving anilist data with an invalid myanimelist ID :return: None
-