def test_raises_http404(self, rf): request = rf.get("/") with pytest.raises(Http404): views.url_surt(request, "fake_slug", "a_surt")
def test_status_ok(self, rf): project = factories.ProjectFactory() request = rf.get("/") response = views.url_surt(request, project.project_slug, "a_surt") assert response.status_code == 200