Exemplo n.º 1
0
 def test3_postinstaller(self, mock_chmod, mock_path_isfile, mock_subprocess):
     mock_path_isfile.return_value = True
     mock_subprocess().returncode = 1
     mock_subprocess().communicate.return_value = [b"stdout", b"stderr"]
     game = Game("Absolute Drift", install_dir="/home/makson/GOG Games/Absolute Drift")
     exp = "Postinstallation script failed: /home/makson/GOG Games/Absolute Drift/support/postinst.sh"
     obs = installer.postinstaller(game)
     self.assertEqual(exp, obs)
Exemplo n.º 2
0
 def test1_postinstaller(self, mock_path_isfile, mock_subprocess):
     mock_path_isfile.return_value = False
     mock_subprocess().returncode = 1
     mock_subprocess().communicate.return_value = [b"stdout", b"stderr"]
     game = Game("Absolute Drift", install_dir="/home/makson/GOG Games/Absolute Drift")
     exp = ""
     obs = installer.postinstaller(game)
     self.assertEqual(exp, obs)