python unittest mock replace function