<commit_before>from django.test import Client
from django.test import TestCase

from tethys_apps.base.app_base import TethysAppBase
from tethys_apps.base.testing.environment import is_testing_environment, get_test_db_name


class TethysTestCase(TestCase):
    """
    This class inherits from the Django TestCase class and is itself the class that is should be inherited from when
    creating test case classes within your app. Note that every specific test written within your custom class
    inheriting from this class must begin with the word "test" or it will not be executed during testing.
    """
    def setUp(self):
        # Resets the apps database and app permissions (workaround since Django's testing framework refreshes the
        # core db after each individual test)
        from tethys_apps.utilities import sync_tethys_db, register_app_permissions
        sync_tethys_db()
        register_app_permissions()
        self.set_up()<commit_msg>Fixed broken testing environment.<commit_after>from django.test import Client
from django.test import TestCase

from tethys_apps.base.app_base import TethysAppBase
from tethys_apps.base.testing.environment import is_testing_environment, get_test_db_name


class TethysTestCase(TestCase):
    """
    This class inherits from the Django TestCase class and is itself the class that is should be inherited from when
    creating test case classes within your app. Note that every specific test written within your custom class
    inheriting from this class must begin with the word "test" or it will not be executed during testing.
    """
    def setUp(self):
        # Resets the apps database and app permissions (workaround since Django's testing framework refreshes the
        # core db after each individual test)
        from tethys_apps.harvester import SingletonHarvester
        harvester = SingletonHarvester()
        harvester.harvest()
        self.set_up()
{'fraction_non_alphanumeric': 0.04345576823590274, 'fraction_numerical': 0.0, 'mean_word_length': 3.921119592875318, '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': '6701668', 'n_tokens_mistral': 498, 'n_tokens_neox': 486, 'n_words': 210}