diff --git a/wgkex/worker/netlink_test.py b/wgkex/worker/netlink_test.py index 86673a7..499fa92 100644 --- a/wgkex/worker/netlink_test.py +++ b/wgkex/worker/netlink_test.py @@ -9,11 +9,14 @@ # any testing platform can execute tests. import sys +import pyroute2.netlink.exceptions +netlink_module_mock = mock.MagicMock() +netlink_module_mock.exceptions = pyroute2.netlink.exceptions sys.modules["pyroute2"] = mock.MagicMock() sys.modules["pyroute2.WireGuard"] = mock.MagicMock() sys.modules["pyroute2.IPRoute"] = mock.MagicMock() sys.modules["pyroute2.NDB"] = mock.MagicMock() -sys.modules["pyroute2.netlink"] = mock.MagicMock() +sys.modules["pyroute2.netlink"] = netlink_module_mock from pyroute2 import WireGuard from pyroute2 import IPRoute