Beispiel #1
0
 def test2_extract_by_innoextract(self, mock_which):
     mock_which.return_value = False
     installer_path = "/home/makson/.cache/minigalaxy/download/Absolute Drift/setup_absolute_drift_1.0f_(64bit)_(47863).exe"
     temp_dir = "/home/makson/.cache/minigalaxy/extract/1136126792"
     exp = "Innoextract not installed."
     obs = installer.extract_by_innoextract(installer_path, temp_dir)
     self.assertEqual(exp, obs)
Beispiel #2
0
 def test3_extract_by_innoextract(self, mock_which, mock_subprocess):
     mock_which.return_value = True
     mock_subprocess().returncode = 1
     mock_subprocess().communicate.return_value = [b"stdout", b"stderr"]
     installer_path = "/home/makson/.cache/minigalaxy/download/Absolute Drift/setup_absolute_drift_1.0f_(64bit)_(47863).exe"
     temp_dir = "/home/makson/.cache/minigalaxy/extract/1136126792"
     exp = "Innoextract extraction failed."
     obs = installer.extract_by_innoextract(installer_path, temp_dir)
     self.assertEqual(exp, obs)