def test_ona_api(self): view = router.get_api_root_view() request = self.factory.get('/') response = view(request) self.assertEquals(len(response.data), 25)
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)
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)