mock out pyev