Fix the import errors by adding a #noqa when the import is necessary by mock