Extract common test_helper logic to common support module