for tests, the request object might not be there