def METHOD_NAME(self):
    """Assert a SMTPHandler is added to the anitya logger when ``EMAIL_ERRORS=True``."""
    config = {
        "DB_URL": "sqlite://",
        "SOCIAL_AUTH_USER_MODEL": "anitya.db.models.User",
        "EMAIL_ERRORS": True,
        "SMTP_SERVER": "smtp.example.com",
        "ADMIN_EMAIL": "admin@example.com",
    }
    anitya_logger = logging.getLogger("anitya")
    anitya_logger.handlers = []
    app.create(config)
    self.assertEqual(1, len(anitya_logger.handlers))
    self.assertEqual("smtp.example.com", anitya_logger.handlers[0].mailhost)
    self.assertEqual(["admin@example.com"], anitya_logger.handlers[0].toaddrs)