def METHOD_NAME(self):
    request = RequestFactory().get("/foo")
    request.user = UserFactory()
    view = logout_required("/bar")(simple_view)
    response = view(request)
    self.assertEqual(302, response.status_code)
    self.assertEqual("/bar", response["location"])