From 1e87767a0cd9a2487f05791aad7a85677ab9dfa8 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 19 Apr 2018 16:56:48 -0400 Subject: [PATCH] fix appveyor --- lbrynet/tests/functional/test_reflector.py | 6 ++---- lbrynet/tests/mocks.py | 5 +++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lbrynet/tests/functional/test_reflector.py b/lbrynet/tests/functional/test_reflector.py index 8537d65f2..0e0d2d182 100644 --- a/lbrynet/tests/functional/test_reflector.py +++ b/lbrynet/tests/functional/test_reflector.py @@ -14,8 +14,6 @@ from lbrynet.file_manager import EncryptedFileManager from lbrynet.tests import mocks from lbrynet.tests.util import mk_db_and_blob_dir, rm_db_and_blob_dir -from lbrynet.tests.mocks import Node - class TestReflector(unittest.TestCase): def setUp(self): @@ -62,7 +60,7 @@ class TestReflector(unittest.TestCase): wallet=wallet, blob_tracker_class=mocks.BlobAvailabilityTracker, external_ip="127.0.0.1", - dht_node_class=Node, + dht_node_class=mocks.Node, hash_announcer=mocks.Announcer() ) @@ -83,7 +81,7 @@ class TestReflector(unittest.TestCase): wallet=wallet, blob_tracker_class=mocks.BlobAvailabilityTracker, external_ip="127.0.0.1", - dht_node_class=Node, + dht_node_class=mocks.Node, hash_announcer=mocks.Announcer() ) diff --git a/lbrynet/tests/mocks.py b/lbrynet/tests/mocks.py index 0845cb2f0..d4c52a2cd 100644 --- a/lbrynet/tests/mocks.py +++ b/lbrynet/tests/mocks.py @@ -25,10 +25,11 @@ class FakeLBRYFile(object): class Node(object): - def __init__(self, peer_finder=None, peer_manager=None, **kwargs): + def __init__(self, peer_finder=None, peer_manager=None, dht_node_port=None, peer_port=3333, **kwargs): self.peer_finder = peer_finder self.peer_manager = peer_manager - self.peerPort = 3333 + self.peerPort = peer_port + self.udpPort = dht_node_port def joinNetwork(self, *args): return defer.succeed(True)