Enable initial admin account in example config
authorJeremy Stanley <fungi@yuggoth.org>
Sun, 14 May 2017 14:00:11 +0000 (14:00 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sun, 14 May 2017 14:00:11 +0000 (14:00 +0000)
The example etc/mudpy.yaml, intended for demonstration purposes,
only binds a listening socket on the loopback interface so shouldn't
be exposed remotely. As a result, turn on the configuration option
to enable elevating the account named "admin" to administrative
privileges automatically upon creation. This allows to run tests of
admin-specific commands with the example configuration.

Also rename the "testadmin" account used by the selftest to match
the name of the default for consistency, and rename test_config.yaml
to test_daemon.yaml reflecting its primary purpose (and also to open
the way for additional test configs as well).

etc/mudpy.yaml
mudpy/tests/fixtures/test_daemon.yaml [moved from mudpy/tests/fixtures/test_config.yaml with 98% similarity]
mudpy/tests/selftest.py

index 672cf4f..c745ab6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2004-2016 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-2017 Jeremy Stanley <fungi@yuggoth.org>. Permission
 # to use, copy, modify, and distribute this software is granted under
 # terms provided in the LICENSE file distributed with this software.
 
 # to use, copy, modify, and distribute this software is granted under
 # terms provided in the LICENSE file distributed with this software.
 
@@ -13,7 +13,7 @@ __control__:
 .mudpy.linguistic.default_punctuation: .
 .mudpy.linguistic.typos: { "i": "I", "i'd": "I'd", "i'll": "I'll", "i'm": "I'm", "teh": "the", "theyre": "they're", "youre": "you're" }
 
 .mudpy.linguistic.default_punctuation: .
 .mudpy.linguistic.typos: { "i": "I", "i'd": "I'd", "i'll": "I'll", "i'm": "I'm", "teh": "the", "theyre": "they're", "youre": "you're" }
 
-#.mudpy.limit.admins: [ admin ]
+.mudpy.limit.admins: [ admin ]
 .mudpy.limit.avatars: 7
 #.mudpy.limit.backups: 10
 .mudpy.limit.password_tries: 3
 .mudpy.limit.avatars: 7
 #.mudpy.limit.backups: 10
 .mudpy.limit.password_tries: 3
similarity index 98%
rename from mudpy/tests/fixtures/test_config.yaml
rename to mudpy/tests/fixtures/test_daemon.yaml
index 5051c26..6b72d15 100644 (file)
@@ -13,7 +13,7 @@ __control__:
 .mudpy.linguistic.default_punctuation: .
 .mudpy.linguistic.typos: { "i": "I", "i'd": "I'd", "i'll": "I'll", "i'm": "I'm", "teh": "the", "theyre": "they're", "youre": "you're" }
 
 .mudpy.linguistic.default_punctuation: .
 .mudpy.linguistic.typos: { "i": "I", "i'd": "I'd", "i'll": "I'll", "i'm": "I'm", "teh": "the", "theyre": "they're", "youre": "you're" }
 
-.mudpy.limit.admins: [ testadmin ]
+.mudpy.limit.admins: [ admin ]
 .mudpy.limit.avatars: 7
 .mudpy.limit.backups: 3
 .mudpy.limit.password_tries: 3
 .mudpy.limit.avatars: 7
 .mudpy.limit.backups: 3
 .mudpy.limit.password_tries: 3
index d246cfe..27378e9 100644 (file)
@@ -131,9 +131,9 @@ test_account1_teardown = (
 )
 
 test_admin_setup = (
 )
 
 test_admin_setup = (
-    (2, "Identify yourself:", "testadmin"),
+    (2, "Identify yourself:", "admin"),
     (2, "Enter your choice:", "n"),
     (2, "Enter your choice:", "n"),
-    (2, "Enter a new password for \"testadmin\":", "Test789"),
+    (2, "Enter a new password for \"admin\":", "Test789"),
     (2, "Enter the same new password again:", "Test789"),
     (2, "What would you like to do\?", "c"),
     (2, "Pick a birth gender for your new avatar:", "m"),
     (2, "Enter the same new password again:", "Test789"),
     (2, "What would you like to do\?", "c"),
     (2, "Pick a birth gender for your new avatar:", "m"),