[MRG] Test common refactor

This actually makes the tests faster and hopefully it will make the actual testing file way better to maintain.
I see that pattern in other place and this could hides tests.