Skip to content

Commit

Permalink
Pass exceptions submodule to pyroute2.netlink module mock
Browse files Browse the repository at this point in the history
  • Loading branch information
DasSkelett committed Mar 28, 2024
1 parent dbb77e1 commit 307056f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wgkex/worker/netlink_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 307056f

Please sign in to comment.