aboutsummaryrefslogtreecommitdiffstats
path: root/tests.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2016-09-22 11:54:29 +0300
committerFilipp Lepalaan <filipp@mac.com>2016-09-22 11:54:29 +0300
commit4c4907ef332b18ae120eb085e04e783d41a60fe8 (patch)
tree9fcf0e698d6f308a2f6f583d91ed6229ebae3577 /tests.py
parente5f97cc751936406700825c42e2e0b93561ca3b5 (diff)
downloadmachammer-4c4907ef332b18ae120eb085e04e783d41a60fe8.tar.gz
machammer-4c4907ef332b18ae120eb085e04e783d41a60fe8.tar.bz2
machammer-4c4907ef332b18ae120eb085e04e783d41a60fe8.zip
Added notifications, tests
Diffstat (limited to 'tests.py')
-rwxr-xr-x[-rw-r--r--]tests.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests.py b/tests.py
index 553b5ed..493fc0f 100644..100755
--- a/tests.py
+++ b/tests.py
@@ -1,9 +1,11 @@
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import subprocess
from unittest import main, skip, TestCase
+import functions as mh
import system_profiler
@@ -24,7 +26,7 @@ class SystemProfilerTestCase(TestCase):
def testOsVersion(self):
"""
- Check that the OS version we get from SP is contained
+ Check that the OS version we get from SP is contained
in the output of sw_vers
"""
build = subprocess.check_output(['sw_vers', '-buildVersion']).strip()
@@ -53,6 +55,20 @@ class AppsTestCase(TestCase):
self.assertTrue(len(results) > 10)
+class FunctionsTestCase(TestCase):
+ def setUp(self):
+ self.stickes = '/Applications/Stickies.app'
+
+ def test_notification(self):
+ mh.display_notification('blaaa')
+
+ def test_add_login_item(self):
+ mh.add_login_item(self.stickes)
+
+ def test_remove_login_item(self):
+ mh.remove_login_item(path=self.stickes)
+
+
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
main()