aboutsummaryrefslogtreecommitdiffstats
path: root/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests.py b/tests.py
index fcce82a..bec8125 100755
--- a/tests.py
+++ b/tests.py
@@ -6,7 +6,7 @@ import subprocess
from unittest import main, skip, TestCase
import machammer.functions as mh
-from machammer import system_profiler
+from machammer import system_profiler, screensaver
class SystemProfilerTestCase(TestCase):
@@ -73,6 +73,19 @@ class FunctionsTestCase(TestCase):
self.assertEquals(p, '/Volumes/Adobe Flash Player Installer')
+class ScreenSaverTestCase(TestCase):
+ def test_set_invalid(self):
+ with self.assertRaises(Exception):
+ screensaver.set('Blalala')
+
+ def test_set_flurry(self):
+ self.assertEquals(screensaver.set('Flurry'), None)
+
+
+ def test_get(self):
+ self.assertEquals(screensaver.get(), 'Flurry')
+
+
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
main()