Added test to ensure exception is raised properly for invalid puzzle data
flake8 cleanup of tests
Minor refactoring to reduce amount of code needed