<commit_before>from django.conf import settings
from django.test import TestCase
from django.test.utils import override_settings
from django.utils import six

from .models import Redirect


@override_settings(
    APPEND_SLASH=False,
    MIDDLEWARE_CLASSES=list(settings.MIDDLEWARE_CLASSES) +
        ['regex_redirects.middleware.RedirectFallbackMiddleware'],
    SITE_ID=1,
)
class RedirectTests(TestCase):

    def setUp(self):
        pass

    def test_model(self):<commit_msg>Isolate tests more by using global_settings middleware.<commit_after>from django.conf import global_settings
from django.test import TestCase
from django.test.utils import override_settings
from django.utils import six

from .models import Redirect


@override_settings(
    APPEND_SLASH=False,
    MIDDLEWARE_CLASSES=list(global_settings.MIDDLEWARE_CLASSES) +
        ['regex_redirects.middleware.RedirectFallbackMiddleware'],
    SITE_ID=1,
)
class RedirectTests(TestCase):

    def setUp(self):
        pass

    def test_model(self):
{'fraction_non_alphanumeric': 0.07367387033398821, 'fraction_numerical': 0.0019646365422396855, 'mean_word_length': 4.85632183908046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '628874', 'n_tokens_mistral': 321, 'n_tokens_neox': 306, 'n_words': 69}