tests/views: Prevent code execution when importing module
This can lead to nasty side effects otherwise.