small test cleanup, can isolate to a singular core test fixture

This commit is contained in:
Blake J. Harnden 2017-07-25 10:16:18 -07:00
parent 45a11f7586
commit f767c32643
8 changed files with 67 additions and 79 deletions

View file

@ -528,13 +528,16 @@ class BasicRangeModel(WirelessModel):
with self.wlan._linked_lock:
linked = self.wlan.linked(a, b)
logger.info("checking if link distance is out of range: %s > %s", d, self.range)
logger.info("checking range netif1(%s) netif2(%s): linked(%s) actual(%s) > config(%s)",
a.name, b.name, linked, d, self.range)
if d > self.range:
if linked:
logger.info("was linked, unlinking")
self.wlan.unlink(a, b)
self.sendlinkmsg(a, b, unlink=True)
else:
if not linked:
logger.info("was not linked, linking")
self.wlan.link(a, b)
self.sendlinkmsg(a, b)
except KeyError: