'POSTing to ban_user_and_cleanup url submits revisions to akismet.'

@override_config(AKISMET_KEY='dashboard')
@requests_mock.mock()
def test_post_submits_revisions_to_akismet_as_spam(self, mock_requests):

    num_revisions = 3
    revisions_created = self.create_revisions(num=num_revisions, creator=self.testuser)
    mock_requests = self.enable_akismet_and_mock_requests(mock_requests)
    data = {'revision-id': [rev.id for rev in revisions_created]}
    resp = self.client.post(self.ban_testuser_url, data=data)
    eq_(200, resp.status_code)
    testuser_submissions = RevisionAkismetSubmission.objects.filter(revision__creator=self.testuser.id)
    eq_(testuser_submissions.count(), num_revisions)
    for submission in testuser_submissions:
        ok_((submission.revision in revisions_created))
    ok_(mock_requests.called)
    eq_(mock_requests.call_count, (2 * num_revisions))
