<commit_before>import logging

from exam import before, fixture
from mock import patch

from flask import Flask, current_app
from flask.ext.login import LoginManager, AnonymousUser, login_user

from raven.base import Client
from raven.contrib.flask import Sentry
from raven.utils.testutils import TestCase


class TempStoreClient(Client):
    def __init__(self, servers=None, **kwargs):
        self.events = []
        super(TempStoreClient, self).__init__(servers=servers, **kwargs)

    def is_enabled(self):
        return True

    def send(self, **kwargs):
        self.events.append(kwargs)


class User(AnonymousUser):
    is_active = lambda x: True
    is_authenticated = lambda x: True
    get_id = lambda x: 1

<commit_msg>Fixed a regression for Flask Login >= 0.2<commit_after>import logging

from exam import before, fixture
from mock import patch

from flask import Flask, current_app
from flask.ext.login import LoginManager, AnonymousUserMixin, login_user

from raven.base import Client
from raven.contrib.flask import Sentry
from raven.utils.testutils import TestCase


class TempStoreClient(Client):
    def __init__(self, servers=None, **kwargs):
        self.events = []
        super(TempStoreClient, self).__init__(servers=servers, **kwargs)

    def is_enabled(self):
        return True

    def send(self, **kwargs):
        self.events.append(kwargs)


class User(AnonymousUserMixin):
    is_active = lambda x: True
    is_authenticated = lambda x: True
    get_id = lambda x: 1


{'fraction_non_alphanumeric': 0.08300132802124834, 'fraction_numerical': 0.0026560424966799467, 'mean_word_length': 3.940983606557377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '639225', 'n_tokens_mistral': 455, 'n_tokens_neox': 435, 'n_words': 138}