Rewrote tests to use pytest fixtures and generate tests