unittest: use unittest.mock instead of mock

because the absence of unittest.mock on python2.7, we still fallback to
mock
This commit is contained in:
Yuming Zhu 2024-10-18 13:05:09 +00:00
parent 589e6bbb96
commit ca05418fb5
390 changed files with 966 additions and 451 deletions

View file

@ -1,15 +1,18 @@
from __future__ import absolute_import
import mock
import os
import unittest
try:
from unittest import mock
from unittest.mock import call
except ImportError:
import mock
from mock import call
import six
from mock import call
from koji_cli.commands import handle_import_cg
from . import utils
import os
import unittest
class TestImportCG(utils.CliTestCase):
def mock_os_path_exists(self, filepath):