<commit_before>from django.test import TestCase
from django.http import QueryDict
from django.contrib.auth.models import Permission
from django.contrib import auth

from docserver import forms
from docserver import models
from docserver import util

class SourceFileTest(TestCase):
    def setUp(self):
        permission = Permission.objects.get(codename='docserver.read_restricted')
        self.nuser = auth.models.User.objects.create_user("normaluser")

        self.suser = auth.models.User.objects.create_user("user1", "", "<PASSWORD>")
        self.suser.is_staff = True
        self.suser.save()

        self.ruser = auth.models.User.objects.create_user("restricteduser")
        self.ruser.user_permissions.add(permission)
        self.ruser.save()

        self.col1 = models.Collection.objects.create(collectionid="f33f3f73", name="collection 1", slug="col")
        self.col2 = models.Collection.objects.create(collectionid="f22f2f73", name="collection 2", slug="col2")<commit_msg>Fixing test<commit_after>from django.test import TestCase
from django.http import QueryDict
from django.contrib.auth.models import Permission
from django.contrib import auth

from docserver import forms
from docserver import models
from docserver import util

class SourceFileTest(TestCase):
    def setUp(self):
        permission = Permission.objects.get(codename='read_restricted')
        self.nuser = auth.models.User.objects.create_user("normaluser")

        self.suser = auth.models.User.objects.create_user("user1", "", "<PASSWORD>")
        self.suser.is_staff = True
        self.suser.save()

        self.ruser = auth.models.User.objects.create_user("restricteduser")
        self.ruser.user_permissions.add(permission)
        self.ruser.save()

        self.col1 = models.Collection.objects.create(collectionid="f33f3f73", name="collection 1", slug="col")
        self.col2 = models.Collection.objects.create(collectionid="f22f2f73", name="collection 2", slug="col2")
{'fraction_non_alphanumeric': 0.11487854251012146, 'fraction_numerical': 0.016194331983805668, 'mean_word_length': 4.108527131782946, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4412429', 'n_tokens_mistral': 600, 'n_tokens_neox': 567, 'n_words': 112}