Speed up `nf-core modules` pytests
Description of feature
The pytests for the nf-core modules commands are very slow. I believe this partly due to that every test pulls several remote git repositories in the setUp method. Since all objects that are created by the setUp method are not used by every test, this is unnecessary. We should therefore either move the creation of install objects etc. either to the individual tests or create a test class per modules command with a simpler setUp function. Creating individual classes would also make it easier to test an individual command.
related: #1697
Refactoring will help, too. e.g. extracting functions from classes as done in https://github.com/nf-core/tools/commit/91199fc7e7ad08b73f6e754f304ba4a88572638f.