def test_email_logging(): ''' Make sure email logging is set up ''' email_config = TestConfig() email_config.TESTING = False email_config.MAIL_SERVER = "xyz" email_config.MAIL_PORT = 1 email_config.MAIL_USERNAME = "******" email_config.MAIL_PASSWORD = '' email_config.MAIL_USE_TLS = 1 email_config.ADMINS = "abc" with LogCapture() as test_logger: create_app(email_config) test_logger.check_present( ('app', 'INFO', 'NGS360 loading'), ('app', 'INFO', 'Setting up email logger'), ('app', 'INFO', 'NGS360 loaded.') )