aboutsummaryrefslogtreecommitdiffstats
path: root/tests.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2017-03-24 22:36:27 +0200
committerFilipp Lepalaan <filipp@mac.com>2017-03-24 22:36:27 +0200
commit469ff60b8bf3ee0273f8a8fc80c2ddbe4cacd47d (patch)
tree3f7376766fef8aa551582a1352ae61c9c3356e67 /tests.py
parent66ac3ea8dbf8c88b7d666183edaa34df0688795d (diff)
downloadmachammer-469ff60b8bf3ee0273f8a8fc80c2ddbe4cacd47d.tar.gz
machammer-469ff60b8bf3ee0273f8a8fc80c2ddbe4cacd47d.tar.bz2
machammer-469ff60b8bf3ee0273f8a8fc80c2ddbe4cacd47d.zip
Added more stuff
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests.py b/tests.py
index 85eee77..ef606ae 100755
--- a/tests.py
+++ b/tests.py
@@ -9,7 +9,31 @@ from unittest import main, skip, TestCase
from machammer import (functions, system_profiler,
network, hooks, users,
- screensaver, defaults,)
+ screensaver, defaults,
+ printers, process,)
+
+
+class PrintersTestCase(TestCase):
+ def test_delete_printers(self):
+ printers.delete_printers()
+
+
+class ProcessTestCase(TestCase):
+ def setUp(self):
+ self.appname = 'Stickies'
+
+ def test_kill(self):
+ process.kill(self.appname)
+ self.assertFalse(process.is_running(self.appname))
+
+ def test_open(self):
+ process.open(self.appname)
+ self.assertTrue(process.is_running(self.appname))
+
+ def test_activate(self):
+ process.activate(self.appname)
+ time.sleep(2)
+ self.assertTrue(process.is_active(self.appname))
class SystemProfilerTestCase(TestCase):