Don't duplicate code.  You should put this in `test_common.py` and import it in these modules.