mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-27 16:28:53 +00:00
simple error-case for URIHandler.render_GET
This commit is contained in:
parent
3adaf5a956
commit
fc32d1e377
@ -7,6 +7,7 @@ from ...storage_client import NativeStorageServer
|
||||
from ...web.root import Root
|
||||
from ...util.connection_status import ConnectionStatus
|
||||
from allmydata.web.root import URIHandler
|
||||
from allmydata.web.common import WebError
|
||||
|
||||
from nevow.inevow import IRequest
|
||||
|
||||
@ -61,9 +62,16 @@ class RenderSlashUri(unittest.TestCase):
|
||||
"mukesarwdjxiyqsjinbfiiro6q7kgmmekocxfjcngh23oxwyxtzq:2:5:5874882"
|
||||
)
|
||||
)
|
||||
|
||||
self.res.render_GET(self.request)
|
||||
|
||||
def test_invalid(self):
|
||||
"""
|
||||
A (trivially) invalid capbility is an error
|
||||
"""
|
||||
self.request.fields["uri"] = FakeField(value="not a capability")
|
||||
with self.assertRaises(WebError):
|
||||
self.res.render_GET(self.request)
|
||||
|
||||
|
||||
class RenderServiceRow(unittest.TestCase):
|
||||
def test_missing(self):
|
||||
|
Loading…
Reference in New Issue
Block a user