Set MAIL_SERVER during testing to use the TESTING_MAIL_SERVER envvar (#1709)

* Override the `MAIL_SERVER` config with the `TESTING_MAIL_SERVER` envvar during tests
This commit is contained in:
Kevin Chung
2020-11-08 22:28:28 -05:00
committed by GitHub
parent 23cef1c755
commit 0ed1a0c659

View File

@@ -210,6 +210,7 @@ class TestingConfig(ServerConfig):
TESTING = True TESTING = True
DEBUG = True DEBUG = True
SQLALCHEMY_DATABASE_URI = os.getenv("TESTING_DATABASE_URL") or "sqlite://" SQLALCHEMY_DATABASE_URI = os.getenv("TESTING_DATABASE_URL") or "sqlite://"
MAIL_SERVER = os.getenv("TESTING_MAIL_SERVER")
SERVER_NAME = "localhost" SERVER_NAME = "localhost"
UPDATE_CHECK = False UPDATE_CHECK = False
REDIS_URL = None REDIS_URL = None