<commit_before>import django.test
from search.models import Project

class NonJavascriptSearch(django.test.TestCase):
    fixtures = ['bugs-for-two-projects.json']

    def testSearch(self):
        response = self.client.get('/search/')
        for n in range(1, 11):
            self.assertContains(response, 'Title #%d' % n)
            self.assertContains(response, 'Description #%d' % n)

    def testMatchingBugsFromMtoN(self):
        # FIXME: This should test for 1 to 10, not 0 to 10
        response = self.client.get('/search/')
        self.assertContains(response, '0 to 10')

    

<commit_msg>Use the response.context to check the provided start and end<commit_after>import django.test
from search.models import Project

class NonJavascriptSearch(django.test.TestCase):
    fixtures = ['bugs-for-two-projects.json']

    def testSearch(self):
        response = self.client.get('/search/')
        for n in range(1, 11):
            self.assertContains(response, 'Title #%d' % n)
            self.assertContains(response, 'Description #%d' % n)

    def testMatchingBugsFromMtoN(self):
        response = self.client.get('/search/')
        self.failUnlessEqual(response.context['start'], 1)
        self.failUnlessEqual(response.context['end'], 10)
        


{'fraction_non_alphanumeric': 0.12392156862745098, 'fraction_numerical': 0.01411764705882353, 'mean_word_length': 2.9875, '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': '2845473', 'n_tokens_mistral': 399, 'n_tokens_neox': 372, 'n_words': 91}