From c375b1503aa800f0219c8c0372b26f606fa9a76b Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 18 Apr 2008 20:13:28 -0700 Subject: [PATCH] mutable/servermap: improve test coverage --- src/allmydata/test/test_mutable.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/allmydata/test/test_mutable.py b/src/allmydata/test/test_mutable.py index b3d78815..9018dc44 100644 --- a/src/allmydata/test/test_mutable.py +++ b/src/allmydata/test/test_mutable.py @@ -599,6 +599,10 @@ class Servermap(unittest.TestCase): self.failUnlessEqual(sm.recoverable_versions(), set([best])) self.failUnlessEqual(len(sm.shares_available()), 1) self.failUnlessEqual(sm.shares_available()[best], (num_shares, 3)) + shnum, peerids = sm.make_sharemap().items()[0] + peerid = list(peerids)[0] + self.failUnlessEqual(sm.version_on_peer(peerid, shnum), best) + self.failUnlessEqual(sm.version_on_peer(peerid, 666), None) return sm def test_basic(self): -- 2.45.2