Testing classes in Python