77a1ebe17e
Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
15 lines
328 B
Python
15 lines
328 B
Python
import pytest
|
|
|
|
import ifaddr
|
|
|
|
|
|
def test_get_adapters():
|
|
"""Test 'get_adapters' against 'lo' interface."""
|
|
lo_ips = [
|
|
n.ip if not isinstance(n.ip, tuple) else n.ip[0]
|
|
for a in ifaddr.get_adapters() if a.name == "lo"
|
|
for n in a.ips
|
|
]
|
|
assert "127.0.0.1" in lo_ips
|
|
assert "::1" in lo_ips
|