Switch from mock to unittest.mock
We were relying on oslotest using the mock library and we were not declaring it in our test-requirements.txt file, but now they are using unittest.mock instead [1], so our unit tests are now failing because the mock library is missing. Switch to unittest.mock that is present in Python 3 to resolve the problem. [1]: https://review.opendev.org/#/c/715704/ Change-Id: If79500534aed2ab992c423f106088905edcb9d7f
This commit is contained in:
parent
18f85d8b25
commit
5ef9a57890
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
import mock
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import ddt
|
||||
import mock
|
||||
|
||||
from cinderlib import exception
|
||||
from cinderlib import objects
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from cinderlib import exception
|
||||
from cinderlib import objects
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from cinder import objects as cinder_ovos
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
import cinderlib
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from cinder import objects as ovos
|
||||
import mock
|
||||
|
||||
import cinderlib
|
||||
from cinderlib import objects
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
import collections
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import ddt
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
import cinderlib
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
# under the License.
|
||||
|
||||
import errno
|
||||
from unittest import mock
|
||||
|
||||
import ddt
|
||||
import mock
|
||||
from os_brick import exception
|
||||
|
||||
from cinderlib import nos_brick
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import cinderlib
|
||||
from cinderlib.persistence import base
|
||||
|
|
Loading…
Reference in New Issue