diff --git a/test/lib/testlib.py b/test/lib/testlib.py index 989fb4d..e6cf159 100644 --- a/test/lib/testlib.py +++ b/test/lib/testlib.py @@ -34,7 +34,7 @@ import string import unittest -from mock import MagicMock as Mock +from unittest.mock import MagicMock as Mock from pyeapi.client import Node diff --git a/test/system/test_client.py b/test/system/test_client.py index 63d840c..896b01a 100644 --- a/test/system/test_client.py +++ b/test/system/test_client.py @@ -37,7 +37,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '../lib')) from testlib import random_int, random_string, get_fixture -from mock import patch +from unittest.mock import patch import pyeapi.client import pyeapi.eapilib diff --git a/test/unit/test_client.py b/test/unit/test_client.py index d094905..3472951 100644 --- a/test/unit/test_client.py +++ b/test/unit/test_client.py @@ -36,7 +36,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '../lib')) -from mock import Mock, patch, call +from unittest.mock import Mock, patch, call from testlib import get_fixture, random_string, random_int diff --git a/test/unit/test_eapilib.py b/test/unit/test_eapilib.py index 1bafef8..2bc7baf 100644 --- a/test/unit/test_eapilib.py +++ b/test/unit/test_eapilib.py @@ -1,7 +1,7 @@ import unittest import json -from mock import Mock, patch +from unittest.mock import Mock, patch import pyeapi.eapilib diff --git a/test/unit/test_utils.py b/test/unit/test_utils.py index 907b48c..a41a7b1 100644 --- a/test/unit/test_utils.py +++ b/test/unit/test_utils.py @@ -1,13 +1,9 @@ -import sys import unittest -from mock import patch, Mock +from unittest.mock import patch, Mock import pyeapi.utils -if sys.version_info < (3, 3): - from collections import Iterable -else: - from collections.abc import Iterable +from collections.abc import Iterable class TestUtils(unittest.TestCase):