[Answered ]-AttributeError: 'UserViewSet' object has no attribute 'user'

1👍

drf routers will use a name like

basename+’-list’

for generated url with list actions. so your code should be:

response = self.client.get(reverse('user-list', kwargs={'fromid':1, 'toid': 100}), format='json')

Leave a comment