Don't run LAN unittests on QubesOS

master
Kevin Froman 2020-08-17 19:02:24 -05:00
parent 0b2658374b
commit 6f242298fe
2 changed files with 10 additions and 0 deletions

View File

@ -17,12 +17,17 @@ from utils import bettersleep
from lan.discover import lan_ips, MCAST_GRP, MCAST_PORT
from lan.discover import learn_services, advertise_service
import socket
import logger
from socket import SHUT_RDWR
from etc import onionrvalues
lan_ips = ['']
class TestLanLearn(unittest.TestCase):
def test_lan_learn(self):
if onionrvalues.IS_QUBES:
logger.info('Cannot run LAN tests on Qubes')
return
test_ip = '192.168.1.30'
def multicast():
port = 1349

View File

@ -19,11 +19,16 @@ from lan.discover import lan_ips, MCAST_GRP, MCAST_PORT, IS_ALL_GROUPS
from lan.discover import advertise_service
import socket
from socket import SHUT_RDWR
import logger
from etc import onionrvalues
class TestLanLearn(unittest.TestCase):
def test_lan_broadcast(self):
test_ip = '192.168.1.30'
if onionrvalues.IS_QUBES:
logger.info('Cannot run LAN tests on Qubes')
return
def multicast():
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)