Added check for inheritance in request_hook
Refactored test_hooks