Avoid usage of too general exception
Update and add py.test methods