def test_calls_valid_path_on_execute_installation(self):
     import os
     import TixApp
     global globalPlatformName
     globalPlatformName = "Darwin"
     installationPath = TixApp.installationPath
     with patch.object(os, 'system') as fn:
       TixApp.execute_installation()
       fn.assert_called_with("sudo %s/installStartupUDPClient" % installationPath)
 def test_removes_userscript_on_delete_existing_installation(self):
     import os
     import shutil
     import TixApp
     global globalPlatformName
     globalPlatformName = "Darwin"
     installationPath = TixApp.installationPath
     with patch.object(os, 'system') as fn:
       TixApp.deleteExistingInstallation(TixApp)
       fn.assert_called_with("launchctl remove com.user.loginscript")
 def test_removes_data_on_delete_existing_installation(self, _, __):
     import os
     import shutil
     import TixApp
     global globalPlatformName
     globalPlatformName = "Darwin"
     installationPath = TixApp.installationPath
     with patch.object(shutil, 'rmtree') as fn:
       TixApp.deleteExistingInstallation(TixApp)
       fn.assert_called_with("/etc/TIX/")
 def test_removes_userscript_file_on_delete_existing_installation(self, _, __):
     import os
     import shutil
     import TixApp
     global globalPlatformName
     globalPlatformName = "Darwin"
     installationPath = TixApp.installationPath
     with patch.object(os, 'remove') as fn:
       TixApp.deleteExistingInstallation(TixApp)
       fn.assert_called_with("~/Library/LaunchAgents/com.user.loginscript.plist")
Example #5
0
 def test_removes_userscript_file_on_delete_existing_installation(
         self, _, __):
     import os
     import shutil
     import TixApp
     global globalPlatformName
     globalPlatformName = "Darwin"
     installationPath = TixApp.installationPath
     with patch.object(os, 'remove') as fn:
         TixApp.deleteExistingInstallation(TixApp)
         fn.assert_called_with(
             "~/Library/LaunchAgents/com.user.loginscript.plist")
Example #6
0
 def test_shows_splash_when_installation_not_exists(self, path):
     import TixApp
     with patch.object(TixApp.LoginScreen, 'show_install_form') as fn:
         screen = TixApp.LoginScreen()
         fn.assert_called_with()