aboutsummaryrefslogtreecommitdiffstats
path: root/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests.py b/tests.py
index ef606ae..f990f81 100755
--- a/tests.py
+++ b/tests.py
@@ -13,6 +13,23 @@ from machammer import (functions, system_profiler,
printers, process,)
+class UsersTestCase(TestCase):
+ def test_nextid(self):
+ self.assertGreater(users.nextid(), 1)
+
+ def test_create(self):
+ info = users.create_user('Test User', 'testpassword')
+ rn = info['dsAttrTypeStandard:RecordName'][0]
+ self.assertEquals(rn, 'test.user')
+
+ def test_make_admin(self):
+ users.make_admin('test.user')
+
+ def test_delete(self):
+ users.create_user('Test User', 'testpassword')
+ users.delete_user('test.user')
+
+
class PrintersTestCase(TestCase):
def test_delete_printers(self):
printers.delete_printers()