Ejemplo n.º 1
0
 def test1_get_version(self):
     api = Api()
     game = MagicMock()
     game.platform = "linux"
     exp = "gog-2"
     obs = api.get_version(game, gameinfo=API_GET_INFO_TOONSTRUCK)
     self.assertEqual(exp, obs)
Ejemplo n.º 2
0
 def test2_get_version(self):
     api = Api()
     test_game = Game("Test Game", platform="linux")
     dlc_name = "Test DLC"
     game_info = API_GET_INFO_TOONSTRUCK
     game_info["expanded_dlcs"] = [{"title": dlc_name, "downloads": {"installers": [{"os": "linux", "version": "1.2.3.4"}]}}]
     exp = "1.2.3.4"
     obs = api.get_version(test_game, gameinfo=API_GET_INFO_TOONSTRUCK, dlc_name=dlc_name)
     self.assertEqual(exp, obs)
Ejemplo n.º 3
0
 def test1_get_version(self):
     api = Api()
     test_game = Game("Test Game", platform="linux")
     exp = "gog-2"
     obs = api.get_version(test_game, gameinfo=API_GET_INFO_TOONSTRUCK)
     self.assertEqual(exp, obs)