diff options
Diffstat (limited to 'tests.py')
-rwxr-xr-x | tests.py | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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() |