From 233d97fbff3c7c6c1869324af4e09e9d869a4ae6 Mon Sep 17 00:00:00 2001 From: Renato Alves Date: Sun, 26 Apr 2015 00:24:59 +0100 Subject: [PATCH] Tests: Use IP address instead of hostname with taskd --- test/basetest/taskd.py | 2 +- test/basetest/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/basetest/taskd.py b/test/basetest/taskd.py index f76188cbb..e905c5a82 100644 --- a/test/basetest/taskd.py +++ b/test/basetest/taskd.py @@ -39,7 +39,7 @@ class Taskd(object): TASKD_NOT_LISTENING = 3 def __init__(self, taskd=DEFAULT_TASKD, certpath=None, - address="localhost"): + address="127.0.0.1"): """Initialize a Task server that runs in the background and stores data in a temporary folder diff --git a/test/basetest/utils.py b/test/basetest/utils.py index 5ffc72332..1e2344cde 100644 --- a/test/basetest/utils.py +++ b/test/basetest/utils.py @@ -279,7 +279,7 @@ def get_IPs(hostname): return output -def port_used(addr="localhost", port=None): +def port_used(addr="127.0.0.1", port=None): "Return True if port is in use, False otherwise" if port is None: raise TypeError("Argument 'port' may not be None") @@ -304,7 +304,7 @@ def port_used(addr="localhost", port=None): return False -def find_unused_port(addr="localhost", start=53589, track=True): +def find_unused_port(addr="127.0.0.1", start=53589, track=True): """Find an unused port starting at `start` port If track=False the returned port will not be marked as in-use and the code