<commit_before>import os
import shutil

from django.core.management.base import CommandError
from rest_framework import status
from rest_framework.test import APITestCase
from django.test import TestCase
from django.utils.six import StringIO

from countylimits.models import CountyLimit, County, State
from countylimits.management.commands.load_county_limits import Command


class CountyLimitTest(APITestCase):

    fixtures = ['states.json']

    def populate_db(self):
        """ Prepopulate DB with dummy data. """
        sDC = State.objects.get(state_abbr='DC')
        sVA = State.objects.get(state_abbr='VA')
        cDC1 = County(
            county_name='DC County 1',
            county_fips=333,
            state_id=sDC.id)
        cDC1.save()
        cDC2 = County(
            county_name='DC County 2',<commit_msg>try Django test class instead of DRF<commit_after>import os
import shutil

from django.core.management.base import CommandError
from rest_framework import status
from rest_framework.test import APITestCase
from django.test import TestCase
from django.utils.six import StringIO

from countylimits.models import CountyLimit, County, State
from countylimits.management.commands.load_county_limits import Command


class CountyLimitTest(TestCase):

    fixtures = ['states.json']

    def populate_db(self):
        """ Prepopulate DB with dummy data. """
        sDC = State.objects.get(state_abbr='DC')
        sVA = State.objects.get(state_abbr='VA')
        cDC1 = County(
            county_name='DC County 1',
            county_fips=333,
            state_id=sDC.id)
        cDC1.save()
        cDC2 = County(
            county_name='DC County 2',
{'fraction_non_alphanumeric': 0.08442330558858502, 'fraction_numerical': 0.009512485136741973, 'mean_word_length': 3.197007481296758, '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': '5409215', 'n_tokens_mistral': 498, 'n_tokens_neox': 486, 'n_words': 129}