<commit_before>"""
Test nacelle's settings handling
"""
# third-party imports
import webapp2

# local imports
from nacelle.test.testcases import NacelleTestCase


class SettingsTests(NacelleTestCase):

    def test_get_valid_setting(self):
        """Test getting a setting that exists
        """
        settings = webapp2.import_string('nacelle.conf.settings')
        self.assertEqual(settings.ROUTES_MODULE, 'app.ROUTES')

    def test_get_invalid_setting(self):
        """Test that getting a setting that doesn't exist throws an AttributeError
        """
        settings = webapp2.import_string('nacelle.conf.settings')
        with self.assertRaises(AttributeError):
            settings.UNDEFINED_MADE_UP_SETTING<commit_msg>fixed failing test<commit_after>"""
Test nacelle's settings handling
"""
# third-party imports
import webapp2

# local imports
from nacelle.test.testcases import NacelleTestCase


class SettingsTests(NacelleTestCase):

    def test_get_valid_setting(self):
        """Test getting a setting that exists
        """
        settings = webapp2.import_string('nacelle.conf.settings')
        self.assertEqual(settings.ROUTES_MODULE, 'routes.ROUTES')

    def test_get_invalid_setting(self):
        """Test that getting a setting that doesn't exist throws an AttributeError
        """
        settings = webapp2.import_string('nacelle.conf.settings')
        with self.assertRaises(AttributeError):
            settings.UNDEFINED_MADE_UP_SETTING
{'fraction_non_alphanumeric': 0.08930987821380243, 'fraction_numerical': 0.0040595399188092015, 'mean_word_length': 3.6952380952380954, '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': '3612650', 'n_tokens_mistral': 425, 'n_tokens_neox': 415, 'n_words': 95}