From: Brian Warner Date: Sat, 19 Apr 2008 03:13:28 +0000 (-0700) Subject: mutable/servermap: improve test coverage X-Git-Tag: allmydata-tahoe-1.1.0~213 X-Git-Url: https://git.rkrishnan.org/pf/content/de.html?a=commitdiff_plain;h=c375b1503aa800f0219c8c0372b26f606fa9a76b;p=tahoe-lafs%2Ftahoe-lafs.git mutable/servermap: improve test coverage --- 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):