The testsuite fails when spamassassin is installed

This test only fails when spamassassin is installed. That wasn't the case with Travis CI so we never saw it, but I was able to reproduce this bug when I packaged ISBG for Debian:


$ pytest-3 tests
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-3.10.1, py-1.7.0, pluggy-0.8.0
rootdir: /builds/isbg/isbg, inifile:
collected 36 items

tests/test___main__.py ..                                                [  5%]
tests/test_imaputils.py ......                                           [ 22%]
tests/test_isbg.py ....                                                  [ 33%]
tests/test_sa_unwrap.py ....                                             [ 44%]
tests/test_secrets.py .                                                  [ 47%]
tests/test_spamproc.py F............                                     [ 83%]
tests/test_utils.py ......                                               [100%]

=================================== FAILURES ===================================
_______________________________ test_learn_mail ________________________________

    def test_learn_mail():
        """Tests for learn_mail."""
        fmail = open('tests/examples/spam.eml', 'rb')
        ftext = fmail.read()
        mail = new_message(ftext)
        fmail.close()
    
        if cmd_exists('spamc'):
            # We forget the mail:
            spamproc.learn_mail(mail, 'forget')
            # We forget the mail:
            ret, ret_o = spamproc.learn_mail(mail, 'forget')
>           assert ret is 6, "Mail should be already unlearned."
E           AssertionError: Mail should be already unlearned.
E           assert 69 is 6

tests/test_spamproc.py:63: AssertionError
===================== 1 failed, 35 passed in 17.22 seconds =====================