From e13b95660b7ac77d764fa4bc4e2567ddbafaec70 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 3 Jun 2016 21:46:16 -0700 Subject: [PATCH] test_transit: tolerate a localhost-only system e.g. Appveyor . Refs #16. --- src/wormhole/test/test_transit.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wormhole/test/test_transit.py b/src/wormhole/test/test_transit.py index 8b17dad..0f13523 100644 --- a/src/wormhole/test/test_transit.py +++ b/src/wormhole/test/test_transit.py @@ -171,6 +171,11 @@ class Basic(unittest.TestCase): d.addBoth(results.append) hints = results[0] c._stop_listening() + # If there are non-localhost hints, then localhost hints should be + # removed. But if the only hint is localhost, it should stay. + if len(hints) == 1: + if hints[0][u'hostname'] == u'127.0.0.1': + return for hint in hints: self.assertFalse(hint[u'hostname'] == u'127.0.0.1')