From a848ee505cff4e968417004173adc790f4e78ff1 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 14 May 2017 14:00:11 +0000 Subject: [PATCH] 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). --- etc/mudpy.yaml | 4 ++-- mudpy/tests/fixtures/{test_config.yaml => test_daemon.yaml} | 2 +- mudpy/tests/selftest.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename mudpy/tests/fixtures/{test_config.yaml => test_daemon.yaml} (98%) 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"), -- 2.11.0