Fixed #20456: easier unit-testing for CBV

Added a class method to return an instance of a CBV.
This allows to unit test part of a CBV directly, without using
the client.

Note: as the ticket didn't have much discussion going on, I did a POC (only modified a single test to show how it would work), feedback on it needed before going further