* Remove ifaddr since psutil provides access to net interfaces
+ added mimcvdf dependency for future block spec
This commit is contained in:
parent
d4f4487fb6
commit
fe3b6c01c4
4 changed files with 75 additions and 34 deletions
|
@ -9,7 +9,7 @@ print("Test directory:", TEST_DIR)
|
|||
os.environ["ONIONR_HOME"] = TEST_DIR
|
||||
import unittest
|
||||
|
||||
from lan.getip import lan_ips
|
||||
from lan.getip import lan_ips, best_ip
|
||||
|
||||
class TestGetLanIps(unittest.TestCase):
|
||||
def test_get_lan_ips(self):
|
||||
|
@ -19,5 +19,11 @@ class TestGetLanIps(unittest.TestCase):
|
|||
if not ip.is_private or ip.is_multicast or ip.is_reserved:
|
||||
raise ValueError
|
||||
|
||||
def test_best_lan_ip(self):
|
||||
ip = best_ip
|
||||
ip = ipaddress.IPv4Address(ip)
|
||||
if not ip.is_private or ip.is_multicast or ip.is_reserved:
|
||||
raise ValueError
|
||||
|
||||
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue