diff options
author | Filipp Lepalaan <filipp@mac.com> | 2016-10-27 11:56:06 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2016-10-27 11:56:06 +0300 |
commit | 1a7754ba6dfa52f52b30fb9b80c5311fd671022b (patch) | |
tree | 8362c8fb7dd1804838e97f2393dbd571ce3cf8d6 | |
parent | 634bdd672e46e6e9d6428f3fa1d06695995c78c9 (diff) | |
download | maucl-1a7754ba6dfa52f52b30fb9b80c5311fd671022b.tar.gz maucl-1a7754ba6dfa52f52b30fb9b80c5311fd671022b.tar.bz2 maucl-1a7754ba6dfa52f52b30fb9b80c5311fd671022b.zip |
Added tests
-rwxr-xr-x | tests.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests.py b/tests.py new file mode 100755 index 0000000..b67a966 --- /dev/null +++ b/tests.py @@ -0,0 +1,29 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- + +import unittest +import subprocess + +import mowgli + + +class DefaultTestCase(unittest.TestCase): + def test_disable_au(self): + mowgli.set_pref() + o = subprocess.check_output(['defaults', + 'read', + 'com.microsoft.autoupdate2', + 'HowToCheck']) + self.assertEquals(o.strip(), 'Manual') + + def test_enable_au(self): + mowgli.set_pref(v='Automatic') + o = subprocess.check_output(['defaults', + 'read', + 'com.microsoft.autoupdate2', + 'HowToCheck']) + self.assertEquals(o.strip(), 'Automatic') + + +if __name__ == '__main__': + unittest.main() |