Drop netifaces (replaced by psutil). Fixes #344.

This commit is contained in:
grossmj committed 2015-11-08 13:34:27 -07:00
1 parent 6fbc84c0dc
commit c3e99bfc1d
7 files changed
+18 -30

No files matched your search

+2 -2
View File
@@ -132,8 +132,8 @@ def free_console_port(request, port_manager, project):
@pytest.fixture
def ethernet_device():
import netifaces
return netifaces.interfaces()[0]
import psutil
return sorted(psutil.net_if_addrs().keys())[0]
@pytest.yield_fixture(autouse=True)
+2 -2
View File
@@ -16,7 +16,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import netifaces
from gns3server.utils.interfaces import interfaces, is_interface_up
@@ -28,7 +27,8 @@ def test_interfaces():
def test_is_interface_up():
if sys.platform.startswith("win"):
assert is_interface_up(netifaces.interfaces[0]) is True
# is_interface_up() always returns True on Windows
pass
elif sys.platform.startswith("darwin"):
assert is_interface_up("lo0") is True
else: