mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
3 files changed
+29
-1
No files matched your search
@@ -17,7 +17,7 @@
|
||||
|
||||
import sys
|
||||
|
||||
from gns3server.utils.interfaces import interfaces, is_interface_up
|
||||
from gns3server.utils.interfaces import interfaces, is_interface_up, has_netmask
|
||||
|
||||
|
||||
def test_interfaces():
|
||||
@@ -29,6 +29,16 @@ def test_interfaces():
|
||||
assert interface["special"]
|
||||
|
||||
|
||||
def test_has_netmask():
|
||||
if sys.platform.startswith("win"):
|
||||
# No loopback
|
||||
pass
|
||||
elif sys.platform.startswith("darwin"):
|
||||
assert has_netmask("lo0") is True
|
||||
else:
|
||||
assert has_netmask("lo") is True
|
||||
|
||||
|
||||
def test_is_interface_up():
|
||||
if sys.platform.startswith("win"):
|
||||
# is_interface_up() always returns True on Windows
|
||||
|
||||
Reference in new issue
Block a user