def test_humanEvent_raises_http404(rf): """An Http404 should be raised when the view is unable to locate an Event. """ request = rf.get('/') with pytest.raises(Http404): views.humanEvent(request)
def test_humanEvent_returns_ok(rf): event = factories.EventFactory.create() request = rf.get('/') response = views.humanEvent(request, event.event_identifier) assert response.status_code == 200