<commit_before>from django.test import TestCase
from django.core.urlresolvers import reverse

class Get_Test(TestCase):
    fixtures = ['temp1.json']
    
    def test_index(self):
    
        response = self.client.get('/spaces/')
        self.assertEqual(response.status_code, 200)
        
    def test_2(self):
    
        response = self.client.get('/spaces/')
        self.assertTrue('object_list' in response.context)
    
    def test_3(self):
    
        response = self.client.get('/spaces/')
        space_4 = response.context['object_list'][3]
        self.assertEqual(space_4.pk, 4)
        self.assertEqual(space_4.name, 'sk')
        self.assertEqual(space_4.url, 'sk')
    
    def test_3(self):    
        response = self.client.get('/spaces/sks/')
        self.assertEqual(response.status_code, 404)
        
        response = self.client.get('/spaces/sk/')
        self.assertEqual(response.status_code, 200)
        
        self.assertTrue('get_place' in response.context)
        self.assertTrue('entities' in response.context)
        self.assertTrue('documents' in response.context)
        self.assertTrue('proposals' in response.context)
        self.assertTrue('publication' in response.context)
        
        self.assertTrue(response.context['get_place'], 'sk')
        self.assertFalse(response.context['entities'], 'something')
        self.assertFalse(response.context['documents'], 'something')
        self.assertFalse(response.context['proposals'], 'something')
        self.assertFalse(response.context['publication'], 'something')

    def test_4(self):<commit_msg>unit tests for views processing get requests in spaces<commit_after>from django.test import TestCase
from django.core.urlresolvers import reverse

class Get_Test(TestCase):
    fixtures = ['temp1.json']
    
    def test_index(self):
    
        response = self.client.get('/spaces/')
        self.assertEqual(response.status_code, 200)
        
    def test_2(self):
    
        response = self.client.get('/spaces/')
        self.assertTrue('object_list' in response.context)
    
    def test_3(self):
    
        response = self.client.get('/spaces/')
        space_4 = response.context['object_list'][3]
        self.assertEqual(space_4.pk, 4)
        self.assertEqual(space_4.name, 'sk')
        self.assertEqual(space_4.url, 'sk')
    
    def test_3(self):    
        
        response = self.client.get('/spaces/sks/')
        self.assertEqual(response.status_code, 404)
        
        response = self.client.get('/spaces/sk/')
        self.assertEqual(response.status_code, 200)
        
        self.assertTrue('get_place' in response.context)
        self.assertTrue('entities' in response.context)
        self.assertTrue('documents' in response.context)
        self.assertTrue('proposals' in response.context)
        self.assertTrue('publication' in response.context)
        
        self.assertTrue(response.context['get_place'], 'sk')
        self.assertFalse(response.context['entities'], 'something')
        self.assertFalse(response.context['documents'], 'something')
        self.assertFalse(response.context['proposals'], 'something')
        self.assertFalse(response.context['publication'], 'something')

    def test_4(self):
    
{'fraction_non_alphanumeric': 0.12832263978001834, 'fraction_numerical': 0.012221203788573174, 'mean_word_length': 2.784971098265896, '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': '5920153', 'n_tokens_mistral': 957, 'n_tokens_neox': 940, 'n_words': 155}