Check before outputting needs in model-test

This is a simple fix for #2755, checking whether there’s a `needs` local before trying to print it.

The `model-test` blueprint will continue to ignore parameters passed in, like most of the other test blueprints.