def test_game_info_switch(self): game = noj.game_info("70010000012085") self.assertEqual(game.platform, Platforms.NINTENDO_SWITCH) self.assertEqual(game.region, Regions.JP) self.assertEqual(game.title, "大乱闘スマッシュブラザーズ SPECIAL") self.assertEqual(game.nsuid, "70010000012085") self.assertEqual(game.unique_id, "AAAB") self.assertEqual(game.players, 8) self.assertFalse(game.free_to_play) self.assertEqual(game.rating, (Ratings.CERO, "A")) self.assertEqual(game.release_date.year, 2018) self.assertEqual(game.release_date.month, 12) self.assertEqual(game.release_date.day, 7) self.assertIn("任天堂", game.developers) self.assertEqual(game.features.get(Features.AMIIBO), True) self.assertEqual(game.features.get(Features.DLC), True) self.assertEqual(game.features.get(Features.NSO_REQUIRED), True) self.assertEqual(game.eshop.jp_jp, "https://store-jp.nintendo.com/list/software/70010000012085.html")
def test_noj(self): game: SwitchGame = noj.game_info(nsuid="70010000010822") self.assertEqual("Celeste", str(game)) self.assertEqual("70010000010822", game.nsuid) self.assertEqual("ACF3", game.unique_id) self.assertEqual("Matt Makes Games Inc.", game.developer) self.assertEqual("Matt Makes Games", game.publisher) self.assertEqual("JP", game.region) self.assertEqual("Nintendo Switch", game.platform) self.assertEqual(2018, game.release_date.year) self.assertEqual(5, game.release_date.month) self.assertEqual(10, game.release_date.day) self.assertEqual(2, len(game.genres)) self.assertEqual(9, len(game.languages)) self.assertEqual(1, game.players) self.assertEqual("https://ec.nintendo.com/JP/ja/titles/70010000010822", game.url(country="JP", lang="ja")) self.assertFalse(game.demo) self.assertFalse(game.dlc) self.assertFalse(game.game_vouchers) self.assertFalse(game.nso_required) self.assertTrue(game.save_data_cloud)
def test_noj(self): game: N3dsGame = noj.game_info(nsuid="50010000033275") self.assertEqual("リズム天国 ザ・ベスト+", str(game)) self.assertEqual("50010000033275", game.nsuid) self.assertEqual("BPJ", game.unique_id) self.assertEqual("任天堂", game.developer) self.assertIsNone(game.publisher) self.assertEqual("JP", game.region) self.assertEqual("Nintendo 3DS", game.platform) self.assertEqual(2015, game.release_date.year) self.assertEqual(6, game.release_date.month) self.assertEqual(11, game.release_date.day) self.assertEqual(2, len(game.genres)) self.assertEqual(1, game.players) self.assertEqual("https://www.nintendo.co.jp/titles/50010000033275", game.url(country="JP")) self.assertEqual("https://www.nintendo.co.jp/titles/50010000033275", game.url(country="JP", lang="ja")) self.assertIsNone(game.demo) self.assertIsNone(game.dlc) self.assertIsNone(game.street_pass) self.assertFalse(game.virtual_console)
def test_game_info_switch(self): game: SwitchGame = noj.game_info(nsuid="70010000012085") self.assertEqual("大乱闘スマッシュブラザーズ SPECIAL", game.title) self.assertEqual("70010000012085", game.nsuid) self.assertEqual("AAAB", game.unique_id) self.assertEqual("JP", game.region) self.assertEqual("Nintendo Switch", game.platform) self.assertEqual("任天堂", game.developer) self.assertEqual("任天堂", game.publisher) self.assertEqual(2018, game.release_date.year) self.assertEqual(12, game.release_date.month) self.assertEqual(7, game.release_date.day) self.assertEqual(["アクション"], game.genres) self.assertEqual( [ "イタリア語", "オランダ語", "スペイン語", "ドイツ語", "フランス語", "ロシア語", "中国語 (簡体字)", "中国語 (繁体字)", "日本語", "英語", "韓国語", ], game.languages ) self.assertEqual(8, game.players) self.assertEqual(16141, game.megabytes) self.assertTrue(game.amiibo) self.assertFalse(game.demo) self.assertTrue(game.dlc) self.assertFalse(game.free_to_play) self.assertTrue(game.local_multiplayer) self.assertTrue(game.nso_required) self.assertTrue(game.save_data_cloud)
def test_game_info_n3ds(self): game: N3dsGame = noj.game_info(nsuid="50010000025416") self.assertEqual("大乱闘スマッシュブラザーズ for Nintendo 3DS", game.title) self.assertEqual("50010000025416", game.nsuid) self.assertEqual("AXC", game.unique_id) self.assertEqual("JP", game.region) self.assertEqual("Nintendo 3DS", game.platform) self.assertEqual(2014, game.release_date.year) self.assertEqual(9, game.release_date.month) self.assertEqual(13, game.release_date.day) self.assertEqual(["アクション", "格闘"], game.genres) self.assertEqual(1, game.players) self.assertTrue(game.amiibo) self.assertFalse(game.dlc) self.assertFalse(game.free_to_play) self.assertFalse(game.virtual_console)
def test_game_info_wiiu(self): game = noj.game_info("20010000010867") self.assertEqual(game.platform, Platforms.NINTENDO_WIIU) self.assertEqual(game.region, Regions.JP) self.assertEqual(game.title, "大乱闘スマッシュブラザーズ for Wii U") self.assertEqual(game.nsuid, "20010000010867") self.assertEqual(game.unique_id, "AXF") self.assertEqual(game.players, 8) self.assertFalse(game.free_to_play) self.assertEqual(game.rating, (Ratings.CERO, "A")) self.assertEqual(game.release_date.year, 2014) self.assertEqual(game.release_date.month, 12) self.assertEqual(game.release_date.day, 6) self.assertIn("任天堂", game.developers) self.assertEqual(game.features.get(Features.AMIIBO), True) self.assertEqual(game.eshop.jp_jp, "https://www.nintendo.co.jp/titles/20010000010867")
def test_game_info_3ds(self): game = noj.game_info("50010000025416") self.assertEqual(game.platform, Platforms.NINTENDO_3DS) self.assertEqual(game.region, Regions.JP) self.assertEqual(game.title, "大乱闘スマッシュブラザーズ for Nintendo 3DS") self.assertEqual(game.nsuid, "50010000025416") self.assertEqual(game.unique_id, "AXC") self.assertEqual(game.players, 1) self.assertFalse(game.free_to_play) self.assertEqual(game.rating, (Ratings.CERO, "A")) self.assertEqual(game.release_date.year, 2014) self.assertEqual(game.release_date.month, 9) self.assertEqual(game.release_date.day, 13) self.assertIn("任天堂", game.developers) self.assertEqual(game.features.get(Features.AMIIBO), True) self.assertEqual(game.eshop.jp_jp, "https://www.nintendo.co.jp/titles/50010000025416")
def test_game_info_non_existant(self): game = noj.game_info(nsuid="60010000000000") self.assertIsNone(game)
def test_noj(self, nsuid, title, checker): game = noj.game_info(nsuid) self.assertEqual(title, game.title) checker(self, game)