convert akismet response type to bool, for SpamCheckResult
diff --git a/Allura/allura/lib/spam/__init__.py b/Allura/allura/lib/spam/__init__.py
index 316fb0f..af5480f 100644
--- a/Allura/allura/lib/spam/__init__.py
+++ b/Allura/allura/lib/spam/__init__.py
@@ -22,6 +22,7 @@
 
 from allura.lib.helpers import exceptionless
 from allura.model.artifact import SpamCheckResult
+from allura import model as M
 
 log = logging.getLogger(__name__)
 
@@ -48,7 +49,7 @@
     def submit_ham(self, text, artifact=None, user=None, content_type='comment', **kw):
         log.info("No submit_ham available for %s", self.filter_name)
 
-    def record_result(self, result, artifact, user):
+    def record_result(self, result: bool, artifact: M.Artifact, user: M.User):
         log.info("spam={} ({}): {}".format(str(result), self.filter_name, artifact.url() if artifact else ''))
         r = SpamCheckResult(
             ref=artifact.ref if artifact else None,
diff --git a/Allura/allura/lib/spam/akismetfilter.py b/Allura/allura/lib/spam/akismetfilter.py
index c4c85d2..9f22199 100644
--- a/Allura/allura/lib/spam/akismetfilter.py
+++ b/Allura/allura/lib/spam/akismetfilter.py
@@ -17,6 +17,7 @@
 
 import logging
 
+from akismet import CheckResponse
 from tg import request
 from tg import tmpl_context as c
 
@@ -112,7 +113,8 @@
                                                          content_type=content_type,
                                                          request=request,
                                                          ))
-        self.record_result(res, artifact, user)
+        spam = res != CheckResponse.HAM
+        self.record_result(spam, artifact, user)
         return res
 
     def submit_spam(self, text, artifact=None, user=None, content_type='comment'):
diff --git a/Allura/allura/tests/unit/spam/test_akismet.py b/Allura/allura/tests/unit/spam/test_akismet.py
index 268545d..20a205f 100644
--- a/Allura/allura/tests/unit/spam/test_akismet.py
+++ b/Allura/allura/tests/unit/spam/test_akismet.py
@@ -23,6 +23,7 @@
 import six.moves.urllib.error
 from datetime import datetime
 
+from akismet import CheckResponse
 from bson import ObjectId
 
 from allura.lib.spam.akismetfilter import AKISMET_AVAILABLE, AkismetSpamFilter
@@ -39,6 +40,8 @@
             # side effect to test that data being sent to
             # akismet can be successfully urlencoded
             six.moves.urllib.parse.urlencode(kw.get('data', {}))
+            return CheckResponse.HAM  # relevant to comment_check()
+
         self.akismet.service.comment_check = mock.Mock(side_effect=side_effect)
         self.akismet.service.submit_spam = mock.Mock(side_effect=side_effect)
         self.akismet.service.submit_ham = mock.Mock(side_effect=side_effect)