[Answered ]-How can I test the URLS for my Class Based Views in Django?

1👍

You can check with the .view_class attribute attached to the function:

def test_health_hub_update_url_is_resolved(self):
    url = reverse('HealthHub:health_hub_update')
    self.assertEqual(resolve(url).func.view_class, views.UpdateHealth)

Leave a comment