Skip to content

Commit b89dcc5

Browse files
Remove external mock dependency (#2155)
Since the minimum version of Python we support contains mock in the standard library, we should switch to it and remove one external dependency. Co-authored-by: Kirk Byers <[email protected]>
1 parent 9c6aa2c commit b89dcc5

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ pytest-cov==5.0.0
77
pytest-json-report==1.5.0
88
pyflakes==3.2.0
99
pylama==8.4.1
10-
mock==5.2.0
1110
mypy==1.11.1
1211
types-PyYAML==6.0.12.20241230
1312
types-requests==2.32.0.20241016

test/eos/test_heredoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import mock
1+
from unittest import mock
22
import pytest
33
from textwrap import dedent
44

test/nxos/test_getters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"""Tests for getters."""
22

3+
from unittest.mock import patch
4+
35
from napalm.base.test.getters import BaseTestGetters, wrap_test_cases
46
from napalm.base.test import helpers
57
from napalm.base import models
68

79
import pytest
8-
from mock import patch
910

1011

1112
def mock_time():

test/nxos_ssh/test_getters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"""Tests for getters."""
22

3+
from unittest.mock import patch
4+
35
from napalm.base.test.getters import BaseTestGetters, wrap_test_cases
46
from napalm.base.test import helpers
57
from napalm.base import models
68

79
import pytest
8-
from mock import patch
910

1011

1112
def mock_time():

0 commit comments

Comments
 (0)