Simplified the boiler plate for pytest