Skip to content

Commit dbbb2c8

Browse files
committed
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.
1 parent 17e0aeb commit dbbb2c8

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
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.1.0
1110
mypy==1.10.0
1211
types-PyYAML==6.0.12.20240311
1312
types-requests==2.32.0.20240521

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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +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
9-
1010

1111
def mock_time():
1212
return 1500000000.000000

test/nxos_ssh/test_getters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +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
9-
1010

1111
def mock_time():
1212
return 1500000000.000000

0 commit comments

Comments
 (0)