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: I4e885ce16080d302552217280b88b9dee3839555
This commit is contained in:
parent
397aee4ee2
commit
3e3f94e6c9
|
@ -57,7 +57,6 @@ Mako==1.0.7
|
||||||
MarkupSafe==1.1.0
|
MarkupSafe==1.1.0
|
||||||
mccabe==0.5.3
|
mccabe==0.5.3
|
||||||
microversion-parse==0.2.1
|
microversion-parse==0.2.1
|
||||||
mock==2.0.0
|
|
||||||
monotonic==1.5
|
monotonic==1.5
|
||||||
mox3==0.26.0
|
mox3==0.26.0
|
||||||
msgpack==0.6.1
|
msgpack==0.6.1
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from sahara.plugins import exceptions as ex
|
from sahara.plugins import exceptions as ex
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara.plugins import base as pb
|
from sahara.plugins import base as pb
|
||||||
from sahara.plugins import exceptions as ex
|
from sahara.plugins import exceptions as ex
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara_plugin_vanilla.plugins.vanilla.hadoop2 import oozie_helper
|
from sahara_plugin_vanilla.plugins.vanilla.hadoop2 import oozie_helper
|
||||||
from sahara_plugin_vanilla.tests.unit import base
|
from sahara_plugin_vanilla.tests.unit import base
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara.plugins import base as pb
|
from sahara.plugins import base as pb
|
||||||
from sahara.plugins import conductor
|
from sahara.plugins import conductor
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from sahara_plugin_vanilla.plugins.vanilla.hadoop2 import recommendations_utils
|
from sahara_plugin_vanilla.plugins.vanilla.hadoop2 import recommendations_utils
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
|
||||||
def mock_event_wrapper(*args, **kwargs):
|
def mock_event_wrapper(*args, **kwargs):
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara_plugin_vanilla.i18n import _
|
from sahara_plugin_vanilla.i18n import _
|
||||||
from sahara_plugin_vanilla.plugins.vanilla.hadoop2 import config_helper
|
from sahara_plugin_vanilla.plugins.vanilla.hadoop2 import config_helper
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara_plugin_vanilla.plugins.vanilla.hadoop2 import starting_scripts
|
from sahara_plugin_vanilla.plugins.vanilla.hadoop2 import starting_scripts
|
||||||
from sahara_plugin_vanilla.tests.unit import base
|
from sahara_plugin_vanilla.tests.unit import base
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara.plugins import utils
|
from sahara.plugins import utils
|
||||||
from sahara_plugin_vanilla.plugins.vanilla.hadoop2 import utils as u
|
from sahara_plugin_vanilla.plugins.vanilla.hadoop2 import utils as u
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara_plugin_vanilla.plugins.vanilla import confighints_helper
|
from sahara_plugin_vanilla.plugins.vanilla import confighints_helper
|
||||||
from sahara_plugin_vanilla.tests.unit import base as sahara_base
|
from sahara_plugin_vanilla.tests.unit import base as sahara_base
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara.plugins import provisioning as p
|
from sahara.plugins import provisioning as p
|
||||||
from sahara_plugin_vanilla.plugins.vanilla.v2_7_1 import config_helper
|
from sahara_plugin_vanilla.plugins.vanilla.v2_7_1 import config_helper
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara.plugins import edp
|
from sahara.plugins import edp
|
||||||
from sahara_plugin_vanilla.plugins.vanilla.v2_7_1 import edp_engine
|
from sahara_plugin_vanilla.plugins.vanilla.v2_7_1 import edp_engine
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara.plugins import provisioning as p
|
from sahara.plugins import provisioning as p
|
||||||
from sahara_plugin_vanilla.plugins.vanilla.v2_7_5 import config_helper
|
from sahara_plugin_vanilla.plugins.vanilla.v2_7_5 import config_helper
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara.plugins import edp
|
from sahara.plugins import edp
|
||||||
from sahara_plugin_vanilla.plugins.vanilla.v2_7_5 import edp_engine
|
from sahara_plugin_vanilla.plugins.vanilla.v2_7_5 import edp_engine
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara.plugins import provisioning as p
|
from sahara.plugins import provisioning as p
|
||||||
from sahara_plugin_vanilla.plugins.vanilla.v2_8_2 import config_helper
|
from sahara_plugin_vanilla.plugins.vanilla.v2_8_2 import config_helper
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from sahara.plugins import edp
|
from sahara.plugins import edp
|
||||||
from sahara.tests.unit import base as sahara_base
|
from sahara.tests.unit import base as sahara_base
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ bashate>=0.5.1 # Apache-2.0
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
doc8>=0.6.0 # Apache-2.0
|
doc8>=0.6.0 # Apache-2.0
|
||||||
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>=1.0.0 # Apache-2.0
|
stestr>=1.0.0 # Apache-2.0
|
||||||
pylint==1.4.5 # GPLv2
|
pylint==1.4.5 # GPLv2
|
||||||
|
|
Loading…
Reference in New Issue