You should put your hooks in conftest.py in the test directory. This file used to declare fixtures and hooks used in all tests in this directory or subdirectories.
conftest.py
PyTest reference