예제 #1
0
 def test_fetching_different_id_types(self):
     """
     Tests generating an ID using the constructor and fetching the
     different IDs
     :return: None
     """
     _id = Id({IdType.MYANIMELIST: 1, IdType.ANILIST: 2, IdType.KITSU: 3})
     self.assertEqual(1, _id.get(IdType.MYANIMELIST))
     self.assertEqual(2, _id.get(IdType.ANILIST))
     self.assertEqual(3, _id.get(IdType.KITSU))
예제 #2
0
 def test_setting_ids(self):
     """
     Tests manually setting IDs after construction
     :return: None
     """
     _id = Id({IdType.MYANIMELIST: 1})
     _id.set(100, IdType.MYANIMELIST)
     _id.set(200, IdType.ANILIST)
     _id.set(300, IdType.KITSU)
     self.assertEqual(100, _id.get(IdType.MYANIMELIST))
     self.assertEqual(200, _id.get(IdType.ANILIST))
     self.assertEqual(300, _id.get(IdType.KITSU))