Esempio n. 1
0
    def test_ona_api(self):
        view = router.get_api_root_view()

        request = self.factory.get('/')
        response = view(request)

        self.assertEquals(len(response.data), 25)
Esempio n. 2
0
    def test_number_of_viewsets(self):
        '''
        Counts the number of viewsets
        '''
        view = router.get_api_root_view()

        request = self.factory.get('/')
        response = view(request)
        self.assertEquals(len(response.data), 27)
Esempio n. 3
0
 def test_number_of_viewsets(self):
     '''
     Counts the number of viewsets
     '''
     view = router.get_api_root_view()
     path = '/api/v1/'
     request = self.factory.get(path)
     request.resolver_match = resolve(path)
     response = view(request)
     self.assertEquals(len(response.data), 27)