Browse Source

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: Id49c895492a7f6cd101ccbff2e7645b67e0f56e8
changes/45/734545/2
Hervé Beraud 1 month ago
parent
commit
a5fe7ca453
4 changed files with 3 additions and 4 deletions
  1. +0
    -1
      lower-constraints.txt
  2. +1
    -1
      sahara_plugin_spark/tests/unit/plugins/spark/test_config_helper.py
  3. +2
    -1
      sahara_plugin_spark/tests/unit/plugins/spark/test_plugin.py
  4. +0
    -1
      test-requirements.txt

+ 0
- 1
lower-constraints.txt View File

@@ -57,7 +57,6 @@ Mako==1.0.7
MarkupSafe==1.1.0
mccabe==0.5.3
microversion-parse==0.2.1
mock==2.0.0
monotonic==1.5
mox3==0.26.0
msgpack==0.6.1


+ 1
- 1
sahara_plugin_spark/tests/unit/plugins/spark/test_config_helper.py View File

@@ -16,7 +16,7 @@
import copy
import xml.dom.minidom as xml

import mock
from unittest import mock

from sahara.plugins import swift_helper as swift
from sahara.plugins import utils


+ 2
- 1
sahara_plugin_spark/tests/unit/plugins/spark/test_plugin.py View File

@@ -13,7 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import mock
from unittest import mock

import testtools

from sahara.plugins import base as pb


+ 0
- 1
test-requirements.txt View File

@@ -9,7 +9,6 @@ bashate>=0.5.1 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
pylint==1.4.5 # GPLv2


Loading…
Cancel
Save