summaryrefslogtreecommitdiff
path: root/reconfigure/tests/configs/passwd_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'reconfigure/tests/configs/passwd_tests.py')
-rw-r--r--reconfigure/tests/configs/passwd_tests.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/reconfigure/tests/configs/passwd_tests.py b/reconfigure/tests/configs/passwd_tests.py
new file mode 100644
index 0000000..8f9a5de
--- /dev/null
+++ b/reconfigure/tests/configs/passwd_tests.py
@@ -0,0 +1,36 @@
+from reconfigure.configs import PasswdConfig
+from base_test import BaseConfigTest
+
+
+class PasswdConfigTest (BaseConfigTest):
+ sources = {
+ None: """backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+"""
+ }
+ result = {
+ 'users': [
+ {
+ 'name': 'backup',
+ 'password': 'x',
+ 'uid': '34',
+ 'gid': '34',
+ 'comment': 'backup',
+ 'home': '/var/backups',
+ 'shell': '/bin/sh'
+ },
+ {
+ 'name': 'list',
+ 'password': 'x',
+ 'uid': '38',
+ 'gid': '38',
+ 'comment': 'Mailing List Manager',
+ 'home': '/var/list',
+ 'shell': '/bin/sh'
+ },
+ ]
+ }
+ config = PasswdConfig
+
+
+del BaseConfigTest