<commit_before>from django.conf import settings
from mongoengine import Document, fields
from mongodbforms import DocumentForm
import unittest


class MyDocument(Document):
    mystring = fields.StringField()
    myverbosestring = fields.StringField(verbose_name="Foobar")
    myrequiredstring = fields.StringField(required=True)


class MyForm(DocumentForm):
    class Meta:
        document = MyDocument


class SimpleDocumentTest(unittest.TestCase):

    @classmethod
    def setUpTestCase(cls):
        settings.configure()

    def test_form(self):
        form = MyForm()
        self.assertEquals(len(form.fields), 3)
        self.assertFalse(form.fields['mystring'].required)<commit_msg>Should be setupclass<commit_after>from django.conf import settings
from mongoengine import Document, fields
from mongodbforms import DocumentForm
import unittest


class MyDocument(Document):
    mystring = fields.StringField()
    myverbosestring = fields.StringField(verbose_name="Foobar")
    myrequiredstring = fields.StringField(required=True)


class MyForm(DocumentForm):
    class Meta:
        document = MyDocument


class SimpleDocumentTest(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        settings.configure()

    def test_form(self):
        form = MyForm()
        self.assertEquals(len(form.fields), 3)
        self.assertFalse(form.fields['mystring'].required)
{'fraction_non_alphanumeric': 0.08895265423242468, 'fraction_numerical': 0.0014347202295552368, 'mean_word_length': 4.185873605947956, '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': '3063576', 'n_tokens_mistral': 396, 'n_tokens_neox': 374, 'n_words': 85}