fixing mock deprecation warnings