I'm using Django Rest Framework 3.7.7. What I want to do is test all my list_route and detail_route methods on the view to achieve 100% with coverage but:
1. I couldn't get to pass values when trying to test a detail_route. I got to call the method, using .post but on the view, it shows nothing in self.request.POST self.user = UserFactory(username='otro', is_superuser=False) self.user.set_password('otro') self.user.save() self.token_user = AuthToken.objects.create(self.user) self.client_user = APIClient() self.client_user.credentials(HTTP_AUTHORIZATION='Token ' + self.token_user) response = self.client_user.post(''/api/people/1/, {name:'new'}, format='json') 2. What I could get easily was to test a list_route, getting a successfully response with data. BUT, when I ran coverage, I seems ignoring that test in the final report. What I use to test was: response = self.client_user.get('/api/people/', format='json') So, what I want to know is: 1. How could I pass values using POST to the view when testing? 2. How could I make coverages to detect my test when using list_route? -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.