diff --git a/src/allmydata/test/test_storage.py b/src/allmydata/test/test_storage.py
index 5c5e2c7..c63323a 100644
a
|
b
|
class Server(unittest.TestCase): |
332 | 332 | self.failUnlessIn('maximum-immutable-share-size', sv1) |
333 | 333 | self.failUnlessIn('maximum-mutable-share-size', sv1) |
334 | 334 | |
| 335 | def test_declares_available_space(self): |
| 336 | ss = self.create("test_declares_available_space") |
| 337 | ver = ss.remote_get_version() |
| 338 | sv1 = ver['http://allmydata.org/tahoe/protocols/storage/v1'] |
| 339 | self.failUnlessIn('available-space', sv1) |
| 340 | |
335 | 341 | def allocate(self, ss, storage_index, sharenums, size, canary=None): |
336 | 342 | renew_secret = hashutil.tagged_hash("blah", "%d" % self._lease_secret.next()) |
337 | 343 | cancel_secret = hashutil.tagged_hash("blah", "%d" % self._lease_secret.next()) |
diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py
index 14684c3..8c5ead4 100644
a
|
b
|
class FakeDisplayableServer(StubServer): |
192 | 192 | def get_nickname(self): |
193 | 193 | return self.announcement["nickname"] |
194 | 194 | def get_available_space(self): |
195 | | return 0 |
| 195 | return 123456 |
196 | 196 | |
197 | 197 | class FakeBucketCounter(object): |
198 | 198 | def get_state(self): |
… |
… |
class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi |
620 | 620 | self.failUnlessIn(u'<td>fake_nickname \u263A</td>', res_u) |
621 | 621 | self.failUnlessIn(u'<div class="nickname">other_nickname \u263B</div>', res_u) |
622 | 622 | self.failUnlessIn(u'\u00A9 <a href="https://tahoe-lafs.org/">Tahoe-LAFS Software Foundation', res_u) |
| 623 | self.failUnlessIn('<td><h3>Available</h3></td>', res) |
| 624 | self.failUnlessIn('123.5kB', res) |
623 | 625 | |
624 | 626 | self.s.basedir = 'web/test_welcome' |
625 | 627 | fileutil.make_dirs("web/test_welcome") |