Get rid of 3rd party mock

... by replacing it by the built-in unittest.mock .

Change-Id: Ie853237d5c59730353d5ea4a7e61888e066614be
This commit is contained in:
Takashi Kajinami 2024-02-02 11:28:35 +09:00
parent 6fa80234bc
commit 2c27834add
9 changed files with 11 additions and 18 deletions

View File

@ -12,8 +12,8 @@
import fixtures import fixtures
import logging import logging
import mock
import os import os
from unittest import mock
import diskimage_builder.block_device.tests.test_config as tc import diskimage_builder.block_device.tests.test_config as tc

View File

@ -12,7 +12,7 @@
import copy import copy
import logging import logging
import mock from unittest import mock
import diskimage_builder.block_device.tests.test_config as tc import diskimage_builder.block_device.tests.test_config as tc

View File

@ -12,9 +12,9 @@
import fixtures import fixtures
import logging import logging
import mock
import os import os
import subprocess import subprocess
from unittest import mock
import diskimage_builder.block_device.tests.test_base as tb import diskimage_builder.block_device.tests.test_base as tb

View File

@ -12,8 +12,8 @@
import functools import functools
import logging import logging
import mock
import os import os
from unittest import mock
import diskimage_builder.block_device.tests.test_config as tc import diskimage_builder.block_device.tests.test_config as tc

View File

@ -12,9 +12,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import importlib import importlib
import mock
import os import os
import sys import sys
from unittest import mock
from oslotest import base from oslotest import base

View File

@ -14,9 +14,9 @@
import collections import collections
import functools import functools
import importlib import importlib
import mock
import os import os
import sys import sys
from unittest import mock
from oslotest import base from oslotest import base
from testtools.matchers import Mismatch from testtools.matchers import Mismatch

View File

@ -12,12 +12,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import jsonschema import os
import mock
import subprocess import subprocess
import tempfile import tempfile
from unittest import mock
import jsonschema
import testtools import testtools
import os
import yaml import yaml
from diskimage_builder import diskimage_builder as dib from diskimage_builder import diskimage_builder as dib

View File

@ -1,7 +1,3 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
networkx>=2.3.0 # BSD networkx>=2.3.0 # BSD
pbr!=2.1.0,>=2.0.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0
PyYAML>=3.12 # MIT PyYAML>=3.12 # MIT

View File

@ -1,11 +1,6 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pylint>=1.7.1 #GPLv2 pylint>=1.7.1 #GPLv2
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT testtools>=2.2.0 # MIT