I think what I'm trying to is self evident:
urls.py
urlpatterns = [ path('', views.home_page, name='home_page'), ] test.py
def test_home_page_view_name_uses_correct_url(self): name = self.client.get(reverse('home_page')) path = self.client.get('/') self.assertEqual(name, path) But I get this error:
AssertionError: <HttpResponse status_code=200, "text/html; charset=utf-8"> != <HttpResponse status_code=200, "text/html; charset=utf-8"> How can I test this correctly?