Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2 runtimes. Since we now only support py36 and later, we can use the standard lib unittest.mock module instead Change-Id: Ie36f12a4a6dd3c06b9ffd9bfb7bbb0106311820f
This commit is contained in:
parent
f455f64293
commit
469b7d66b3
@ -6,7 +6,6 @@
|
|||||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
||||||
bashate>=0.5.1 # Apache-2.0
|
bashate>=0.5.1 # Apache-2.0
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
mock>=2.0.0 # BSD
|
|
||||||
virtualenv>=14.0.6 # MIT
|
virtualenv>=14.0.6 # MIT
|
||||||
# TODO(noonedeadpunk) Upgrade linters versions and drop pycodestyle
|
# TODO(noonedeadpunk) Upgrade linters versions and drop pycodestyle
|
||||||
# once we stop doing linters check for the integrated repo with
|
# once we stop doing linters check for the integrated repo with
|
||||||
|
@ -13,12 +13,12 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
import mock
|
|
||||||
import os
|
import os
|
||||||
from os import path
|
from os import path
|
||||||
from osa_toolkit import filesystem as fs
|
from osa_toolkit import filesystem as fs
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from test_inventory import cleanup
|
from test_inventory import cleanup
|
||||||
from test_inventory import get_inventory
|
from test_inventory import get_inventory
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
import collections
|
import collections
|
||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
import mock
|
|
||||||
import os
|
import os
|
||||||
from os import path
|
from os import path
|
||||||
try:
|
try:
|
||||||
@ -22,6 +21,7 @@ except ImportError:
|
|||||||
import queue as Queue
|
import queue as Queue
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
import warnings
|
import warnings
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user