I've worked out this test is failing when FileDeleteView::post() calls self.get_object() - that's when the 404 is being sent. I can't work out why though, because everything else looks fine.