TST: Moved rest of the test functions to module level. #8023