mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-21 20:08:15 +00:00
Drop unused ctx
argument from render_space methods
This commit is contained in:
parent
d5af7c0d2e
commit
dbc6b2afa0
@ -4223,9 +4223,9 @@ class WebStatus(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
|
||||
|
||||
def test_util(self):
|
||||
w = StorageStatusElement(None, None)
|
||||
self.failUnlessEqual(w.render_space(None, None), "?")
|
||||
self.failUnlessEqual(w.render_space(None, 10e6), "10000000")
|
||||
self.failUnlessEqual(w.render_abbrev_space(None, None), "?")
|
||||
self.failUnlessEqual(w.render_abbrev_space(None, 10e6), "10.00 MB")
|
||||
self.failUnlessEqual(w.render_space(None), "?")
|
||||
self.failUnlessEqual(w.render_space(10e6), "10000000")
|
||||
self.failUnlessEqual(w.render_abbrev_space(None), "?")
|
||||
self.failUnlessEqual(w.render_abbrev_space(10e6), "10.00 MB")
|
||||
self.failUnlessEqual(remove_prefix("foo.bar", "foo."), "bar")
|
||||
self.failUnlessEqual(remove_prefix("foo.bar", "baz."), None)
|
||||
|
@ -50,12 +50,12 @@ class StorageStatusElement(Element):
|
||||
return tag("?")
|
||||
return tag(abbreviate_space(val))
|
||||
|
||||
def render_abbrev_space(self, ctx, size):
|
||||
def render_abbrev_space(self, size):
|
||||
if size is None:
|
||||
return "?"
|
||||
return abbreviate_space(size)
|
||||
|
||||
def render_space(self, ctx, size):
|
||||
def render_space(self, size):
|
||||
if size is None:
|
||||
return "?"
|
||||
return "%d" % size
|
||||
|
Loading…
Reference in New Issue
Block a user