diff --git a/tests/debug_app_config.py b/tests/debug_app_config.py new file mode 100644 index 0000000..605593b --- /dev/null +++ b/tests/debug_app_config.py @@ -0,0 +1,33 @@ +import tempfile +from pathlib import Path + +TESTING = True +DEBUG = True +LOG_FILE = 'webapp.log' + +token_file = tempfile.NamedTemporaryFile(delete=False).name +token_data = """# token | name | organization | email | valid_thru +#042979fa186280|||| +04387cfa186280|Gandalf|Wizards|gandalf@shire.me| +043a81fa186280|Bilbo|Hobbits|bilbo@shire.me| +#04538cfa186280|Gimli|Dwarves|gimli@shire.me| +""" +Path(token_file).write_text(token_data) +TOKEN_FILE = str(token_file) + +SECRET_KEY = 'supersecret' +SECURITY_PASSWORD_SALT = 'salty' + +admin_file = tempfile.NamedTemporaryFile(delete=False).name +admin_data = """# create new super-admin by putting the following data in this file: +# username email ldap/password +# the third column can either be LDAP, in which case the user will be able to authenticate through LDAP +# or if it's not LDAP then it should be the password for the new user which will be stored in the local database +# examples: +gandalf gandalf@shire.me shadowfax +""" +Path(admin_file).write_text(admin_data) +ADMIN_FILE = str(admin_file) + +db_file = tempfile.NamedTemporaryFile(delete=False).name +SQLALCHEMY_DATABASE_URI = 'sqlite:///' + str(db_file) \ No newline at end of file