From 50d12a93fa081babf29f88433225b2b5cfb4ff94 Mon Sep 17 00:00:00 2001 From: burris Date: Fri, 13 Sep 2002 19:42:06 +0000 Subject: [PATCH] fix tests --- ktable.py | 4 ++-- node.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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() -- 2.39.5