Of course, that would break the tests, so dev only.

This commit is contained in:
Ray Schamp 2014-04-24 16:36:48 -04:00
parent a67fe5a44b
commit ff10922611

View file

@ -69,7 +69,7 @@ logger = logging.getLogger(__name__)
akismet_api = None
try:
from akismet import Akismet
if getattr(settings, 'ENVIRONMENT', 'production') not in ['test', 'development']:
if getattr(settings, 'ENVIRONMENT', 'production') != 'development':
akismet_api = Akismet(key=forum_settings.AKISMET_API_KEY, blog_url=forum_settings.AKISMET_BLOG_URL, agent=forum_settings.AKISMET_AGENT)
if not akismet_api.verify_key():
logger.error("Invalid Aksimet API key.", extra={'key': akismet_api.key, 'blog': akismet_api.blog_url, 'user_agent': akismet_api.user_agent})