<commit_before>from __future__ import unicode_literals

import pickle

from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ValidationError
from django.core.management import call_command
from django.db import connections, models, router, transaction
from django.db.utils import IntegrityError
from django.test.utils import CaptureQueriesContext
from django.utils.translation import ugettext as _

from mutant.contrib.related.models import ForeignKeyDefinition
from mutant.contrib.text.models import CharFieldDefinition
from mutant.db.models import MutableModel
from mutant.models.model import (
    BaseDefinition, ModelDefinition, MutableModelProxy,
    OrderingFieldDefinition, UniqueTogetherDefinition,
)
from mutant.utils import clear_opts_related_cache, remove_from_app_cache

from .utils import BaseModelDefinitionTestCase

# Remove when dropping support for Python 2
try:
    from test.support import captured_stderr
except ImportError:
    from test.test_support import captured_stderr


class Mixin(object):
    def method(self):
        return 'Mixin'


class ConcreteModel(models.Model):
    concrete_model_field = models.NullBooleanField()

    class Meta:
        app_label = 'mutant'


class ProxyModel(ConcreteModel):
    class Meta:
        proxy = True<commit_msg>Added an app_label to a test proxy model to silence some deprecation warnings.<commit_after>from __future__ import unicode_literals

import pickle

from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ValidationError
from django.core.management import call_command
from django.db import connections, models, router, transaction
from django.db.utils import IntegrityError
from django.test.utils import CaptureQueriesContext
from django.utils.translation import ugettext as _

from mutant.contrib.related.models import ForeignKeyDefinition
from mutant.contrib.text.models import CharFieldDefinition
from mutant.db.models import MutableModel
from mutant.models.model import (
    BaseDefinition, ModelDefinition, MutableModelProxy,
    OrderingFieldDefinition, UniqueTogetherDefinition,
)
from mutant.utils import clear_opts_related_cache, remove_from_app_cache

from .utils import BaseModelDefinitionTestCase

# Remove when dropping support for Python 2
try:
    from test.support import captured_stderr
except ImportError:
    from test.test_support import captured_stderr


class Mixin(object):
    def method(self):
        return 'Mixin'


class ConcreteModel(models.Model):
    concrete_model_field = models.NullBooleanField()

    class Meta:
        app_label = 'mutant'


class ProxyModel(ConcreteModel):
    class Meta:
        app_label = 'mutant'
        proxy = True
{'fraction_non_alphanumeric': 0.052554744525547446, 'fraction_numerical': 0.00072992700729927, 'mean_word_length': 5.187358916478555, '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': '3795228', 'n_tokens_mistral': 725, 'n_tokens_neox': 699, 'n_words': 223}