Remove mock as test requirement
Now that we have moved to py36 and later runtimes, we no longer need to use the third party mock library and can only use the standard library unittest.mock instead. Change-Id: I8994aaadaf2feb806e70e1ea6dc87157012d1334 Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
This commit is contained in:
parent
18608d156c
commit
315053448f
|
@ -114,4 +114,3 @@ urllib3==1.22
|
||||||
warlock==1.3.0
|
warlock==1.3.0
|
||||||
websocket-client==0.47.0
|
websocket-client==0.47.0
|
||||||
wrapt==1.10.11
|
wrapt==1.10.11
|
||||||
mock==2.0.0
|
|
||||||
|
|
|
@ -15,4 +15,3 @@ testtools>=2.2.0 # MIT
|
||||||
reno>=3.1.0 # Apache-2.0
|
reno>=3.1.0 # Apache-2.0
|
||||||
netaddr>=0.7.18 # BSD
|
netaddr>=0.7.18 # BSD
|
||||||
pre-commit # MIT
|
pre-commit # MIT
|
||||||
mock>=2.0.0 # BSD
|
|
||||||
|
|
|
@ -13,7 +13,10 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
try:
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
except ImportError:
|
||||||
|
import mock
|
||||||
|
|
||||||
import library.check_ironic_boot_config as validation
|
import library.check_ironic_boot_config as validation
|
||||||
from tripleo_validations.tests import base
|
from tripleo_validations.tests import base
|
||||||
|
|
|
@ -12,6 +12,10 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
try:
|
||||||
|
from unittest.mock import MagicMock
|
||||||
|
from unittest.mock import patch
|
||||||
|
except ImportError:
|
||||||
from mock import MagicMock
|
from mock import MagicMock
|
||||||
from mock import patch
|
from mock import patch
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,10 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
try:
|
||||||
|
from unittest.mock import MagicMock
|
||||||
|
from unittest.mock import patch
|
||||||
|
except ImportError:
|
||||||
from mock import MagicMock
|
from mock import MagicMock
|
||||||
from mock import patch
|
from mock import patch
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue