diff --git a/package.xml b/package.xml
index e2dcae1e4..dcadca35b 100644
--- a/package.xml
+++ b/package.xml
@@ -40,7 +40,6 @@
python3-nose
python-mock
- python3-mock
python-nose
python3-nose
diff --git a/test/unit_tests/test_environment_cache.py b/test/unit_tests/test_environment_cache.py
index 4e92145a0..d436b1873 100644
--- a/test/unit_tests/test_environment_cache.py
+++ b/test/unit_tests/test_environment_cache.py
@@ -4,7 +4,10 @@
import tempfile
import unittest
-from mock import Mock
+try:
+ from unittest.mock import Mock
+except ImportError:
+ from mock import Mock
try:
import catkin.environment_cache
diff --git a/test/unit_tests/test_find_in_workspace.py b/test/unit_tests/test_find_in_workspace.py
index d205c3a45..e90d877c9 100644
--- a/test/unit_tests/test_find_in_workspace.py
+++ b/test/unit_tests/test_find_in_workspace.py
@@ -3,7 +3,10 @@
import tempfile
import unittest
-from mock import Mock
+try:
+ from unittest.mock import Mock
+except ImportError:
+ from mock import Mock
try:
import catkin
diff --git a/test/unit_tests/test_parse_package_xml.py b/test/unit_tests/test_parse_package_xml.py
index b65885fdd..0da065996 100644
--- a/test/unit_tests/test_parse_package_xml.py
+++ b/test/unit_tests/test_parse_package_xml.py
@@ -4,7 +4,10 @@
import tempfile
import unittest
-from mock import Mock
+try:
+ from mock import Mock
+except ImportError:
+ from mock import Mock
imp.load_source('parse_package_xml',
os.path.join(os.path.dirname(__file__),