fixing mock statements for python3