mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 17:52:50 +00:00
tests for "Available" column (#648)
thanks to the anonymous author who posted this on trac
This commit is contained in:
parent
335c2ed06a
commit
336688165e
@ -332,6 +332,12 @@ class Server(unittest.TestCase):
|
||||
self.failUnlessIn('maximum-immutable-share-size', sv1)
|
||||
self.failUnlessIn('maximum-mutable-share-size', sv1)
|
||||
|
||||
def test_declares_available_space(self):
|
||||
ss = self.create("test_declares_available_space")
|
||||
ver = ss.remote_get_version()
|
||||
sv1 = ver['http://allmydata.org/tahoe/protocols/storage/v1']
|
||||
self.failUnlessIn('available-space', sv1)
|
||||
|
||||
def allocate(self, ss, storage_index, sharenums, size, canary=None):
|
||||
renew_secret = hashutil.tagged_hash("blah", "%d" % self._lease_secret.next())
|
||||
cancel_secret = hashutil.tagged_hash("blah", "%d" % self._lease_secret.next())
|
||||
|
@ -192,7 +192,7 @@ class FakeDisplayableServer(StubServer):
|
||||
def get_nickname(self):
|
||||
return self.announcement["nickname"]
|
||||
def get_available_space(self):
|
||||
return 0
|
||||
return 123456
|
||||
|
||||
class FakeBucketCounter(object):
|
||||
def get_state(self):
|
||||
@ -620,6 +620,8 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
self.failUnlessIn(u'<td>fake_nickname \u263A</td>', res_u)
|
||||
self.failUnlessIn(u'<div class="nickname">other_nickname \u263B</div>', res_u)
|
||||
self.failUnlessIn(u'\u00A9 <a href="https://tahoe-lafs.org/">Tahoe-LAFS Software Foundation', res_u)
|
||||
self.failUnlessIn('<td><h3>Available</h3></td>', res)
|
||||
self.failUnlessIn('123.5kB', res)
|
||||
|
||||
self.s.basedir = 'web/test_welcome'
|
||||
fileutil.make_dirs("web/test_welcome")
|
||||
|
Loading…
x
Reference in New Issue
Block a user