Properly handle the mock -> unittest.mock conversion.