From: burris Date: Fri, 13 Sep 2002 19:42:06 +0000 (+0000) Subject: fix tests X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=50d12a93fa081babf29f88433225b2b5cfb4ff94;p=quix0rs-apt-p2p.git fix tests --- diff --git a/ktable.py b/ktable.py index 3bff407..b47416c 100644 --- a/ktable.py +++ b/ktable.py @@ -219,11 +219,11 @@ import unittest class TestKTable(unittest.TestCase): def setUp(self): - self.a = Node(hash.newID(), 'localhost', 2002) + self.a = Node().init(hash.newID(), 'localhost', 2002) self.t = KTable(self.a) def test_replace_stale_node(self): - self.b = Node(hash.newID(), 'localhost', 2003) + self.b = Node().init(hash.newID(), 'localhost', 2003) self.t.replaceStaleNode(self.a, self.b) assert(len(self.t.buckets[0].l) == 1) assert(self.t.buckets[0].l[0].id == self.b.id) diff --git a/node.py b/node.py index 815f00c..7128ecb 100644 --- a/node.py +++ b/node.py @@ -63,7 +63,7 @@ import unittest class TestNode(unittest.TestCase): def setUp(self): - self.node = Node(hash.newID(), 'localhost', 2002) + self.node = Node().init(hash.newID(), 'localhost', 2002) def testUpdateLastSeen(self): t = self.node.lastSeen self.node.updateLastSeen()