<commit_before>import mock
import unittest

from resto.wsgi import Middleware


class AppTestCase(unittest.TestCase):

    def setUp(self):
        self.environ = {
            'wsgi.version': (1, 0),
            'wsgi.multithread': False,
            'wsgi.multiprocess': False,
            'wsgi.run_once': True,
        }
        self.mock_start = mock.Mock()

    def test_application_init(self):
        result = Middleware(self.environ, self.mock_start)
        content = ''
        for data in result:
            content += data
        self.assertGreater(content, '')


if __name__ == '__main__':
    unittest.main()<commit_msg>Test WSGI start_response is called<commit_after>import mock
import unittest

from resto.wsgi import Middleware


class AppTestCase(unittest.TestCase):

    def setUp(self):
        self.environ = {
            'wsgi.version': (1, 0),
            'wsgi.multithread': False,
            'wsgi.multiprocess': False,
            'wsgi.run_once': True,
        }
        self.mock_start = mock.Mock()

    def test_application_init(self):
        result = Middleware(self.environ, self.mock_start)
        content = ''
        for data in result:
            content += data
        self.assertGreater(content, '')
        self.assertTrue(self.mock_start.called)


if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.11094564408041697, 'fraction_numerical': 0.0029784065524944155, 'mean_word_length': 2.2542372881355934, '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': '1833764', 'n_tokens_mistral': 423, 'n_tokens_neox': 406, 'n_words': 86}