forked from pool/python-napalm
* New features
+ Add format optional variable to core drivers to support get_config()
options
+ [Junos] Add huge_tree as an optional_arg in junos to fix xml huge
tree node
+ [Validate] Add tolerance percentage
* Improvements and bug fixes
+ [NX-OS] Update nxos.py to expose file transfer errors
+ [Validate] Use isinstance(list) instead of types comparison
+ [Junos] Do not try to parse a "none" value and convert it to "" for
get_ipv6_neighbors_table
+ [JUNOS] Fix call to lxml.etree.ElementBase.getparent erroneously
using get_parent
+ [NX-OS SSH, IOS] IPv6 Regex update
+ [IOS] Make get_vlans name whitespace aware
+ [NX-OS] Fix get_bgp_neighbor when neighbor is admin shut
+ [JUNOS] get_bgp_config() - ValueError: Can't convert with callable None
+ [IOS] get_bgp_neighbors same IP different VRF
+ [NX-OS] Handle non standard output for PSU's in get_environment
+ [IOS-XR] Use LastStateTransitionTime to populate last_flapped for
get_interfaces() in IOS-XR
+ [Junos] Fix Can't convert with callable None
- Refreshed python-napalm-no-mock.patch
- Removed patches, included upstream:
* napalm-gh-pr1796-xmlgetparent.patch
* remove-future-requirement.patch
- Add patch support-python-313.patch:
* Use vendored telnetlib provided by netmiko
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=34
74 lines
2.0 KiB
Diff
74 lines
2.0 KiB
Diff
From 9dd413d6254f2dc034903736b65b1853b2163e7d Mon Sep 17 00:00:00 2001
|
|
From: Steve Kowalik <steven@wedontsleep.org>
|
|
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():
|