aboutsummaryrefslogtreecommitdiffstats
path: root/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py30
1 files changed, 29 insertions, 1 deletions
diff --git a/tests.py b/tests.py
index c85ac26..c3f75e9 100755
--- a/tests.py
+++ b/tests.py
@@ -127,7 +127,7 @@ class NetworkTestCase(TestCase):
self.assertTrue(network.is_wired(True))
-class AppsTestCase(TestCase):
+class VersionsTestCase(TestCase):
def setUp(self):
self.profile = system_profiler.SystemProfile('Applications')
@@ -150,6 +150,34 @@ class AppsTestCase(TestCase):
self.assertLess(functions.os_version(), 10.14)
+class AppsTestCase(TestCase):
+
+ def setUp(self):
+ self.key = 'NSNavLastRootDirectory'
+ self.app = process.App('com.apple.Terminal')
+
+ def test_get_prefs(self):
+ path = os.path.expanduser(self.app.prefs.get(self.key))
+ self.assertTrue(os.path.exists(path))
+
+ def test_set_prefs(self):
+ self.app.prefs.set(self.key, '/tmp')
+
+ def test_is_running(self):
+ self.assertTrue(self.app.is_running())
+
+ def test_launch(self):
+ self.assertTrue(self.app.launch())
+
+ def test_quit(self):
+ app = process.App('com.apple.Stickies', 'Stickies')
+ app.launch()
+ #app.quit()
+
+ def test_is_active(self):
+ self.assertTrue(self.app.is_active())
+
+
class InstallerTestCase(TestCase):
def setUp(self):
self.pkg = os.getenv('MH_PKG')