From: Jeremy Stanley Date: Sun, 14 May 2017 14:00:11 +0000 (+0000) Subject: Enable initial admin account in example config X-Git-Tag: 0.0.1~162 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=a848ee505cff4e968417004173adc790f4e78ff1 Enable initial admin account in example config 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). --- diff --git a/etc/mudpy.yaml b/etc/mudpy.yaml index 672cf4f..c745ab6 100644 --- a/etc/mudpy.yaml +++ b/etc/mudpy.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2004-2016 Jeremy Stanley . Permission +# Copyright (c) 2004-2017 Jeremy Stanley . Permission # 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.limit.admins: [ admin ] +.mudpy.limit.admins: [ admin ] .mudpy.limit.avatars: 7 #.mudpy.limit.backups: 10 .mudpy.limit.password_tries: 3 diff --git a/mudpy/tests/fixtures/test_config.yaml b/mudpy/tests/fixtures/test_daemon.yaml similarity index 98% rename from mudpy/tests/fixtures/test_config.yaml rename to mudpy/tests/fixtures/test_daemon.yaml index 5051c26..6b72d15 100644 --- a/mudpy/tests/fixtures/test_config.yaml +++ b/mudpy/tests/fixtures/test_daemon.yaml @@ -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.limit.admins: [ testadmin ] +.mudpy.limit.admins: [ admin ] .mudpy.limit.avatars: 7 .mudpy.limit.backups: 3 .mudpy.limit.password_tries: 3 diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index d246cfe..27378e9 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -131,9 +131,9 @@ test_account1_teardown = ( ) test_admin_setup = ( - (2, "Identify yourself:", "testadmin"), + (2, "Identify yourself:", "admin"), (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"),