Some additional documentation

This commit is contained in:
Jean-Paul Calderone 2019-08-02 11:22:45 -06:00
parent d69de15664
commit 3152a35618
3 changed files with 18 additions and 3 deletions

View File

@ -201,6 +201,21 @@ class UseTestPlugins(object):
class UseNode(object):
"""
A fixture which creates a client node.
:ivar dict[bytes, bytes] plugin_config: Configuration items to put in the
node's configuration.
:ivar bytes storage_plugin: The name of a storage plugin to enable.
:ivar FilePath basedir: The base directory of the node.
:ivar bytes introducer_furl: The introducer furl with which to
configure the client.
:ivar dict[bytes, bytes] node_config: Configuration items for the *node*
section of the configuration.
:ivar _Config config: The complete resulting configuration.
"""
plugin_config = attr.ib()
storage_plugin = attr.ib()

View File

@ -441,10 +441,10 @@ class StoragePluginWebPresence(AsyncTestCase):
"""
The plugin's resource is published at */storage-plugins/<plugin name>*.
"""
url = "http://127.0.0.1:{port}/storage-plugins/{plugin_name}".format(
url = u"http://127.0.0.1:{port}/storage-plugins/{plugin_name}".format(
port=self.port,
plugin_name=self.storage_plugin,
)
).encode("utf-8")
result = yield do_http(b"get", url)
self.assertThat(result, Equals(dumps({b"web": b"1"})))

View File

@ -172,7 +172,7 @@ class WebishServer(service.MultiService):
self.site.remember(self.root.child_operations, IOpHandleTable)
self.root.child_operations.setServiceParent(self)
self.root.putChild("storage-plugins", StoragePlugins(client))
self.root.putChild(b"storage-plugins", StoragePlugins(client))
def buildServer(self, webport, nodeurl_path, staticdir):
self.webport = webport