Fix function broken in 6cb3ca1fd42df583706a5a996bc9e5495fa21cba
Use local functions for tests, use skip for disabled tests