From 9dd413d6254f2dc034903736b65b1853b2163e7d Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 10 Dec 2024 12:07:37 +1100 Subject: [PATCH] Remove external mock dependency Since the minimum version of Python we support contains mock in the standard library, we should switch to it and remove one external dependency. --- requirements-dev.txt | 1 - test/eos/test_heredoc.py | 2 +- test/nxos/test_getters.py | 3 ++- test/nxos_ssh/test_getters.py | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 0a766587e..af4394c46 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,7 +7,6 @@ pytest-cov==5.0.0 pytest-json-report==1.5.0 pyflakes==3.2.0 pylama==8.4.1 -mock==5.1.0 mypy==1.10.0 types-PyYAML==6.0.12.20240311 types-requests==2.32.0.20240521 diff --git a/test/eos/test_heredoc.py b/test/eos/test_heredoc.py index cf5d891fa..418592771 100644 --- a/test/eos/test_heredoc.py +++ b/test/eos/test_heredoc.py @@ -1,4 +1,4 @@ -import mock +from unittest import mock import pytest from textwrap import dedent diff --git a/test/nxos/test_getters.py b/test/nxos/test_getters.py index 3baa5c4b2..3436051f9 100644 --- a/test/nxos/test_getters.py +++ b/test/nxos/test_getters.py @@ -1,11 +1,12 @@ """Tests for getters.""" +from unittest.mock import patch + from napalm.base.test.getters import BaseTestGetters, wrap_test_cases from napalm.base.test import helpers from napalm.base import models import pytest -from mock import patch def mock_time(): diff --git a/test/nxos_ssh/test_getters.py b/test/nxos_ssh/test_getters.py index 3baa5c4b2..3436051f9 100644 --- a/test/nxos_ssh/test_getters.py +++ b/test/nxos_ssh/test_getters.py @@ -1,11 +1,12 @@ """Tests for getters.""" +from unittest.mock import patch + from napalm.base.test.getters import BaseTestGetters, wrap_test_cases from napalm.base.test import helpers from napalm.base import models import pytest -from mock import patch def mock_time():