diff options
author | Filipp Lepalaan <filipp@mac.com> | 2017-03-24 22:36:27 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2017-03-24 22:36:27 +0200 |
commit | 469ff60b8bf3ee0273f8a8fc80c2ddbe4cacd47d (patch) | |
tree | 3f7376766fef8aa551582a1352ae61c9c3356e67 /tests.py | |
parent | 66ac3ea8dbf8c88b7d666183edaa34df0688795d (diff) | |
download | machammer-469ff60b8bf3ee0273f8a8fc80c2ddbe4cacd47d.tar.gz machammer-469ff60b8bf3ee0273f8a8fc80c2ddbe4cacd47d.tar.bz2 machammer-469ff60b8bf3ee0273f8a8fc80c2ddbe4cacd47d.zip |
Added more stuff
Diffstat (limited to 'tests.py')
-rwxr-xr-x | tests.py | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -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): |