Lint test files

Temporarily relax rules for test environment (these errors to be fixed
in a separate commit)
Add stricter linting rules for test files

...and update test source code to pass.