def test_check_email_with_fake_password(app): with app.test_request_context(): if not app.config.get('ENABLE_EMAIL', False): return app.config['EMAIL_PASSWORD'] = '******' try: check_email(app.config) except AssertionError: pass
def test_check_email_with_fake_account(app): with app.test_request_context(): if not app.config.get('ENABLE_EMAIL', False): return app.config['EMAIL_USERNAME'] = '******' app.config['EMAIL_PASSWORD'] = '******' app.config['FROM_ADDR'] = '*****@*****.**' app.config['TO_ADDRS'] = ['*****@*****.**'] try: check_email(app.config) except AssertionError: pass
def test_check_email_with_fake_account(app): with app.test_request_context(): if not app.config.get('EMAIL_PASSWORD', ''): return app.config['EMAIL_USERNAME'] = '******' app.config['EMAIL_PASSWORD'] = '******' app.config['EMAIL_SENDER'] = '*****@*****.**' app.config['EMAIL_RECIPIENTS'] = ['*****@*****.**'] try: check_email(app.config) except AssertionError: pass
def test_check_email_with_ssl_false(app): with app.test_request_context(): if not app.config.get('ENABLE_EMAIL', False) or not app.config.get('SMTP_SERVER_'): return app.config['SMTP_SERVER'] = app.config['SMTP_SERVER_'] app.config['SMTP_PORT'] = app.config['SMTP_PORT_'] app.config['SMTP_OVER_SSL'] = app.config['SMTP_OVER_SSL_'] app.config['SMTP_CONNECTION_TIMEOUT_'] = app.config['SMTP_CONNECTION_TIMEOUT_'] app.config['FROM_ADDR'] = app.config['FROM_ADDR_'] app.config['EMAIL_PASSWORD'] = app.config['EMAIL_PASSWORD_'] app.config['TO_ADDRS'] = app.config['TO_ADDRS_'] check_email(app.config)
def test_check_email_with_ssl_false(app): with app.test_request_context(): if not app.config.get('EMAIL_PASSWORD', '') or not app.config.get('EMAIL_PASSWORD_'): return app.config['EMAIL_USERNAME'] = app.config['EMAIL_USERNAME_'] app.config['EMAIL_PASSWORD'] = app.config['EMAIL_PASSWORD_'] app.config['EMAIL_SENDER'] = app.config['EMAIL_SENDER_'] app.config['EMAIL_RECIPIENTS'] = app.config['EMAIL_RECIPIENTS_'] app.config['SMTP_SERVER'] = app.config['SMTP_SERVER_'] app.config['SMTP_PORT'] = app.config['SMTP_PORT_'] app.config['SMTP_OVER_SSL'] = app.config['SMTP_OVER_SSL_'] app.config['SMTP_CONNECTION_TIMEOUT_'] = app.config[ 'SMTP_CONNECTION_TIMEOUT_'] check_email(app.config)