def METHOD_NAME(self):
    agent = baker.make_recipe("agents.agent")
    unauthorized_agent = baker.make_recipe("agents.agent")
    software = baker.make("software.InstalledSoftware", software={}, agent=agent)
    unauthorized_software = baker.make(  # noqa
        "software.InstalledSoftware", software={}, agent=unauthorized_agent
    )
    # test super user access
    self.check_authorized_superuser("get", f"{base_url}/")
    self.check_authorized_superuser("get", f"{base_url}/{agent.agent_id}/")
    user = self.create_user_with_roles([])
    self.client.force_authenticate(user=user)
    self.check_not_authorized("get", f"{base_url}/")
    self.check_not_authorized("get", f"{base_url}/{agent.agent_id}/")
    # add list software role to user
    user.role.can_list_software = True
    user.role.save()
    r = self.check_authorized("get", f"{base_url}/")
    self.assertEqual(len(r.data), 2)
    self.check_authorized("get", f"{base_url}/{agent.agent_id}/")
    # test limiting to client
    user.role.can_view_clients.set([software.agent.client])
    self.check_not_authorized("get", f"{base_url}/{unauthorized_agent.agent_id}/")
    self.check_authorized("get", f"{base_url}/{agent.agent_id}/")
    # make sure queryset is limited too
    r = self.client.get(f"{base_url}/")
    self.assertEqual(len(r.data), 1)