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:
Gael Chamoulaud (Strider) 2020-07-13 10:20:07 +02:00
parent 18608d156c
commit 315053448f
No known key found for this signature in database
GPG Key ID: 4119D0305C651D66
5 changed files with 16 additions and 8 deletions

View File

@ -114,4 +114,3 @@ urllib3==1.22
warlock==1.3.0
websocket-client==0.47.0
wrapt==1.10.11
mock==2.0.0

View File

@ -15,4 +15,3 @@ testtools>=2.2.0 # MIT
reno>=3.1.0 # Apache-2.0
netaddr>=0.7.18 # BSD
pre-commit # MIT
mock>=2.0.0 # BSD

View File

@ -13,7 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
try:
from unittest import mock
except ImportError:
import mock
import library.check_ironic_boot_config as validation
from tripleo_validations.tests import base

View File

@ -12,8 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from mock import MagicMock
from mock import patch
try:
from unittest.mock import MagicMock
from unittest.mock import patch
except ImportError:
from mock import MagicMock
from mock import patch
from library.check_package_update import check_update
from library.check_package_update import get_package_details

View File

@ -13,9 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from mock import MagicMock
from mock import patch
try:
from unittest.mock import MagicMock
from unittest.mock import patch
except ImportError:
from mock import MagicMock
from mock import patch
import library.ovs_dpdk_pmd_cpus_check as validation
from tripleo_validations.tests import base