Browse Source

Use unittest.mock instead of third party mock

Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I78a70c535950f645fcb3a5f1e820d70cc6958d36
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
changes/65/720965/3
Sean McGinnis 5 months ago
committed by Alex Schultz
parent
commit
bdaa7473b5
5 changed files with 5 additions and 5 deletions
  1. +2
    -1
      openstack_virtual_baremetal/tests/test_auth.py
  2. +1
    -1
      openstack_virtual_baremetal/tests/test_build_nodes_json.py
  3. +1
    -1
      openstack_virtual_baremetal/tests/test_deploy.py
  4. +1
    -1
      openstack_virtual_baremetal/tests/test_openstackbmc.py
  5. +0
    -1
      test-requirements.txt

+ 2
- 1
openstack_virtual_baremetal/tests/test_auth.py View File

@@ -12,9 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

import fixtures
import json
import mock
import testtools

from openstack_virtual_baremetal import auth


+ 1
- 1
openstack_virtual_baremetal/tests/test_build_nodes_json.py View File

@@ -15,9 +15,9 @@
import copy
import json
import sys
from unittest import mock

import fixtures
import mock
import testtools

from openstack_virtual_baremetal import build_nodes_json


+ 1
- 1
openstack_virtual_baremetal/tests/test_deploy.py View File

@@ -14,10 +14,10 @@
# under the License.

import copy
from unittest import mock
import unittest
import yaml

import mock
import testtools

from openstack_virtual_baremetal import deploy


+ 1
- 1
openstack_virtual_baremetal/tests/test_openstackbmc.py View File

@@ -13,10 +13,10 @@
# under the License.

import sys
from unittest import mock
import unittest

import fixtures
import mock
from novaclient import exceptions
import testtools



+ 0
- 1
test-requirements.txt View File

@@ -4,7 +4,6 @@ fixtures>=0.3.14
python-subunit>=0.0.18
stestr
testtools>=0.9.36,!=1.2.0
mock>=1.0

# docs
sphinx!=1.6.6,>=1.6.2,<2.0.0;python_version=='2.7' # BSD


Loading…
Cancel
Save