diff --git a/html5lib/tests/test_meta.py b/html5lib/tests/test_meta.py
index dd02dd7f..e02268aa 100644
--- a/html5lib/tests/test_meta.py
+++ b/html5lib/tests/test_meta.py
@@ -1,7 +1,10 @@
from __future__ import absolute_import, division, unicode_literals
import six
-from mock import Mock
+try:
+ from unittest.mock import Mock
+except ImportError:
+ from mock import Mock
from . import support
diff --git a/requirements-test.txt b/requirements-test.txt
index 39913ee4..aca31f5e 100644
--- a/requirements-test.txt
+++ b/requirements-test.txt
@@ -6,6 +6,5 @@ pytest>=4.6.10,<5 ; python_version < '3'
pytest>=5.4.2,<8 ; python_version >= '3'
coverage>=5.1,<6
pytest-expect>=1.1.0,<2
-mock>=3.0.5,<4 ; python_version < '3.6'
-mock>=4.0.2,<5 ; python_version >= '3.6'
+mock>=3.0.5,<4 ; python_version < '3.3'
setuptools; python_version >= '3.12'