Test daemon in Python